mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument
This is the exact same thing as the 'alloc_obj()' version, only much smaller because there are a lot fewer users of the *alloc_flex() interface. As with alloc_obj() version, this was done entirely with mindless brute force, using the same script, except using 'flex' in the pattern rather than 'objs*'. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
bf4afc53b7
commit
323bbfcf1e
310 changed files with 352 additions and 352 deletions
|
|
@ -233,7 +233,7 @@ static int snd_ctl_new(struct snd_kcontrol **kctl, unsigned int count,
|
|||
if (count == 0 || count > MAX_CONTROL_COUNT)
|
||||
return -EINVAL;
|
||||
|
||||
*kctl = kzalloc_flex(**kctl, vd, count, GFP_KERNEL);
|
||||
*kctl = kzalloc_flex(**kctl, vd, count);
|
||||
if (!*kctl)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ int _snd_ctl_add_follower(struct snd_kcontrol *master,
|
|||
struct link_master *master_link = snd_kcontrol_chip(master);
|
||||
struct link_follower *srec;
|
||||
|
||||
srec = kzalloc_flex(*srec, follower.vd, follower->count, GFP_KERNEL);
|
||||
srec = kzalloc_flex(*srec, follower.vd, follower->count);
|
||||
if (!srec)
|
||||
return -ENOMEM;
|
||||
srec->kctl = follower;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ static int add_conn_list(struct hda_codec *codec, hda_nid_t nid, int len,
|
|||
{
|
||||
struct hda_conn_list *p;
|
||||
|
||||
p = kmalloc_flex(*p, conns, len, GFP_KERNEL);
|
||||
p = kmalloc_flex(*p, conns, len);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
p->len = len;
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ static int sigma_fw_load_data(struct sigmadsp *sigmadsp,
|
|||
|
||||
length -= sizeof(*data_chunk);
|
||||
|
||||
data = kzalloc_flex(*data, data, length, GFP_KERNEL);
|
||||
data = kzalloc_flex(*data, data, length);
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
@ -413,7 +413,7 @@ static int process_sigma_action(struct sigmadsp *sigmadsp,
|
|||
if (len < 3)
|
||||
return -EINVAL;
|
||||
|
||||
data = kzalloc_flex(*data, data, size_sub(len, 2), GFP_KERNEL);
|
||||
data = kzalloc_flex(*data, data, size_sub(len, 2));
|
||||
if (!data)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
|
|
@ -1435,7 +1435,7 @@ static int dapm_widget_list_create(struct snd_soc_dapm_widget_list **list,
|
|||
list_for_each(it, widgets)
|
||||
size++;
|
||||
|
||||
*list = kzalloc_flex(**list, widgets, size, GFP_KERNEL);
|
||||
*list = kzalloc_flex(**list, widgets, size);
|
||||
if (*list == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void sof_ipc4_intel_dump_telemetry_state(struct snd_sof_dev *sdev, u32 flags)
|
|||
break;
|
||||
}
|
||||
|
||||
xoops = kzalloc_flex(*xoops, ar, XTENSA_CORE_AR_REGS_COUNT, GFP_KERNEL);
|
||||
xoops = kzalloc_flex(*xoops, ar, XTENSA_CORE_AR_REGS_COUNT);
|
||||
if (!xoops)
|
||||
goto free_block;
|
||||
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ static int usx2y_rate_set(struct usx2ydev *usx2y, int rate)
|
|||
struct urb *urb;
|
||||
|
||||
if (usx2y->rate != rate) {
|
||||
us = kzalloc_flex(*us, urb, NOOF_SETRATE_URBS, GFP_KERNEL);
|
||||
us = kzalloc_flex(*us, urb, NOOF_SETRATE_URBS);
|
||||
if (!us) {
|
||||
err = -ENOMEM;
|
||||
goto cleanup;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ int virtsnd_pcm_msg_alloc(struct virtio_pcm_substream *vss,
|
|||
int sg_num = virtsnd_pcm_sg_num(data, period_bytes);
|
||||
struct virtio_pcm_msg *msg;
|
||||
|
||||
msg = kzalloc_flex(*msg, sgs, sg_num + 2, GFP_KERNEL);
|
||||
msg = kzalloc_flex(*msg, sgs, sg_num + 2);
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue