diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 03:37:42 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 04:09:51 +0300 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /sound | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.xz | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound')
296 files changed, 550 insertions, 550 deletions
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 0dda1f4d5cbd..15487837e894 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -104,7 +104,7 @@ static int ac97_codec_add(struct ac97_controller *ac97_ctrl, int idx, struct ac97_codec_device *codec; int ret; - codec = kzalloc_obj(*codec, GFP_KERNEL); + codec = kzalloc_obj(*codec); if (!codec) return -ENOMEM; ac97_ctrl->codecs[idx] = codec; @@ -351,7 +351,7 @@ struct ac97_controller *snd_ac97_controller_register( struct ac97_controller *ac97_ctrl; int ret, i; - ac97_ctrl = kzalloc_obj(*ac97_ctrl, GFP_KERNEL); + ac97_ctrl = kzalloc_obj(*ac97_ctrl); if (!ac97_ctrl) return ERR_PTR(-ENOMEM); diff --git a/sound/ac97/snd_ac97_compat.c b/sound/ac97/snd_ac97_compat.c index e6c43556c8f6..1a89286d1b67 100644 --- a/sound/ac97/snd_ac97_compat.c +++ b/sound/ac97/snd_ac97_compat.c @@ -69,7 +69,7 @@ struct snd_ac97 *snd_ac97_compat_alloc(struct ac97_codec_device *adev) struct snd_ac97 *ac97; int ret; - ac97 = kzalloc_obj(struct snd_ac97, GFP_KERNEL); + ac97 = kzalloc_obj(struct snd_ac97); if (ac97 == NULL) return ERR_PTR(-ENOMEM); diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index bce8b35c5c27..3ae8408cd303 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c @@ -959,7 +959,7 @@ static int onyx_i2c_probe(struct i2c_client *client) struct onyx *onyx; u8 dummy; - onyx = kzalloc_obj(struct onyx, GFP_KERNEL); + onyx = kzalloc_obj(struct onyx); if (!onyx) return -ENOMEM; diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c index 9c9b35cb5b6a..13da2b159ad0 100644 --- a/sound/aoa/codecs/tas.c +++ b/sound/aoa/codecs/tas.c @@ -845,7 +845,7 @@ static int tas_i2c_probe(struct i2c_client *client) struct device_node *node = client->dev.of_node; struct tas *tas; - tas = kzalloc_obj(struct tas, GFP_KERNEL); + tas = kzalloc_obj(struct tas); if (!tas) return -ENOMEM; diff --git a/sound/aoa/codecs/toonie.c b/sound/aoa/codecs/toonie.c index 19653cf19292..6aaf4c9debdd 100644 --- a/sound/aoa/codecs/toonie.c +++ b/sound/aoa/codecs/toonie.c @@ -121,7 +121,7 @@ static struct toonie *toonie; static int __init toonie_init(void) { - toonie = kzalloc_obj(struct toonie, GFP_KERNEL); + toonie = kzalloc_obj(struct toonie); if (!toonie) return -ENOMEM; diff --git a/sound/aoa/core/gpio-pmf.c b/sound/aoa/core/gpio-pmf.c index 155a503e1e9b..2995876df534 100644 --- a/sound/aoa/core/gpio-pmf.c +++ b/sound/aoa/core/gpio-pmf.c @@ -173,7 +173,7 @@ static int pmf_set_notify(struct gpio_runtime *rt, notif->gpio_private = NULL; } if (!old && notify) { - irq_client = kzalloc_obj(struct pmf_irq_client, GFP_KERNEL); + irq_client = kzalloc_obj(struct pmf_irq_client); if (!irq_client) return -ENOMEM; irq_client->data = notif; diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 0b73ecda1b1d..c18b55305294 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c @@ -1025,7 +1025,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) goto outnodev; } - ldev = kzalloc_obj(struct layout_dev, GFP_KERNEL); + ldev = kzalloc_obj(struct layout_dev); if (!ldev) goto outnodev; diff --git a/sound/aoa/soundbus/i2sbus/control.c b/sound/aoa/soundbus/i2sbus/control.c index 09e5070e0ae2..1e9f258b5e67 100644 --- a/sound/aoa/soundbus/i2sbus/control.c +++ b/sound/aoa/soundbus/i2sbus/control.c @@ -19,7 +19,7 @@ int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c) { - *c = kzalloc_obj(struct i2sbus_control, GFP_KERNEL); + *c = kzalloc_obj(struct i2sbus_control); if (!*c) return -ENOMEM; diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 8941f3266947..f974b96e98cd 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c @@ -171,7 +171,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, if (strncmp(node_name, "i2s-", 4)) return 0; - dev = kzalloc_obj(struct i2sbus_dev, GFP_KERNEL); + dev = kzalloc_obj(struct i2sbus_dev); if (!dev) return 0; diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c index ceee3320a932..aff99003d833 100644 --- a/sound/aoa/soundbus/i2sbus/pcm.c +++ b/sound/aoa/soundbus/i2sbus/pcm.c @@ -879,7 +879,7 @@ i2sbus_attach_codec(struct soundbus_dev *dev, struct snd_card *card, tmp++; } - cii = kzalloc_obj(struct codec_info_item, GFP_KERNEL); + cii = kzalloc_obj(struct codec_info_item); if (!cii) return -ENOMEM; diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 27d916c8fb29..fdba6e4b25fd 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -519,7 +519,7 @@ snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg) return -ENXIO; struct snd_compr_codec_caps *caps __free(kfree) = - kzalloc_obj(*caps, GFP_KERNEL); + kzalloc_obj(*caps); if (!caps) return -ENOMEM; @@ -539,7 +539,7 @@ int snd_compr_malloc_pages(struct snd_compr_stream *stream, size_t size) if (snd_BUG_ON(!(stream) || !(stream)->runtime)) return -EINVAL; - dmab = kzalloc_obj(*dmab, GFP_KERNEL); + dmab = kzalloc_obj(*dmab); if (!dmab) return -ENOMEM; dmab->dev = stream->dma_buffer.dev; @@ -694,7 +694,7 @@ snd_compr_get_params(struct snd_compr_stream *stream, unsigned long arg) return -EBADFD; struct snd_codec *params __free(kfree) = - kzalloc_obj(*params, GFP_KERNEL); + kzalloc_obj(*params); if (!params) return -ENOMEM; retval = stream->ops->get_params(stream, params); @@ -1066,7 +1066,7 @@ static int snd_compr_task_new(struct snd_compr_stream *stream, struct snd_compr_ return -EBUSY; if (utask->origin_seqno != 0 || utask->input_size != 0) return -EINVAL; - task = kzalloc_obj(*task, GFP_KERNEL); + task = kzalloc_obj(*task); if (task == NULL) return -ENOMEM; task->seqno = utask->seqno = snd_compr_seqno_next(stream); diff --git a/sound/core/control.c b/sound/core/control.c index eb4a3c1214fb..ffefc5ec6d6b 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -2057,7 +2057,7 @@ static int _snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn, struct list_head * { struct snd_kctl_ioctl *pn; - pn = kzalloc_obj(struct snd_kctl_ioctl, GFP_KERNEL); + pn = kzalloc_obj(struct snd_kctl_ioctl); if (pn == NULL) return -ENOMEM; pn->fioctl = fcn; diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index 174395322c51..16bc80555f26 100644 --- a/sound/core/control_compat.c +++ b/sound/core/control_compat.c @@ -82,7 +82,7 @@ static int snd_ctl_elem_info_compat(struct snd_ctl_file *ctl, struct snd_card *card = ctl->card; int err; struct snd_ctl_elem_info *data __free(kfree) = - kzalloc_obj(*data, GFP_KERNEL); + kzalloc_obj(*data); if (! data) return -ENOMEM; @@ -177,7 +177,7 @@ static int get_ctl_type(struct snd_card *card, struct snd_ctl_elem_id *id, return -ENOENT; struct snd_ctl_elem_info *info __free(kfree) = - kzalloc_obj(*info, GFP_KERNEL); + kzalloc_obj(*info); if (info == NULL) return -ENOMEM; info->id = *id; @@ -283,7 +283,7 @@ static int __ctl_elem_read_user(struct snd_card *card, { int err, type, count; struct snd_ctl_elem_value *data __free(kfree) = - kzalloc_obj(*data, GFP_KERNEL); + kzalloc_obj(*data); if (data == NULL) return -ENOMEM; @@ -318,7 +318,7 @@ static int __ctl_elem_write_user(struct snd_ctl_file *file, struct snd_card *card = file->card; int err, type, count; struct snd_ctl_elem_value *data __free(kfree) = - kzalloc_obj(*data, GFP_KERNEL); + kzalloc_obj(*data); if (data == NULL) return -ENOMEM; @@ -380,7 +380,7 @@ static int snd_ctl_elem_add_compat(struct snd_ctl_file *file, int replace) { struct snd_ctl_elem_info *data __free(kfree) = - kzalloc_obj(*data, GFP_KERNEL); + kzalloc_obj(*data); if (! data) return -ENOMEM; diff --git a/sound/core/control_led.c b/sound/core/control_led.c index 07eebf849ae3..d92b36ab5ec6 100644 --- a/sound/core/control_led.c +++ b/sound/core/control_led.c @@ -653,7 +653,7 @@ static void snd_ctl_led_sysfs_add(struct snd_card *card) for (group = 0; group < MAX_LED; group++) { led = &snd_ctl_leds[group]; - led_card = kzalloc_obj(*led_card, GFP_KERNEL); + led_card = kzalloc_obj(*led_card); if (!led_card) goto cerr2; led_card->number = card->number; diff --git a/sound/core/device.c b/sound/core/device.c index 80c02914877f..5f2aa476d89b 100644 --- a/sound/core/device.c +++ b/sound/core/device.c @@ -34,7 +34,7 @@ int snd_device_new(struct snd_card *card, enum snd_device_type type, if (snd_BUG_ON(!card || !device_data || !ops)) return -ENXIO; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return -ENOMEM; INIT_LIST_HEAD(&dev->list); diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c index a98de8d9ce16..9fcd1c03dc5b 100644 --- a/sound/core/hrtimer.c +++ b/sound/core/hrtimer.c @@ -64,7 +64,7 @@ static int snd_hrtimer_open(struct snd_timer *t) { struct snd_hrtimer *stime; - stime = kzalloc_obj(*stime, GFP_KERNEL); + stime = kzalloc_obj(*stime); if (!stime) return -ENOMEM; stime->timer = t; diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index a493db2160ed..973d11732bfd 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c @@ -375,7 +375,7 @@ int snd_hwdep_new(struct snd_card *card, char *id, int device, return -ENXIO; if (rhwdep) *rhwdep = NULL; - hwdep = kzalloc_obj(*hwdep, GFP_KERNEL); + hwdep = kzalloc_obj(*hwdep); if (!hwdep) return -ENOMEM; diff --git a/sound/core/info.c b/sound/core/info.c index de8ec34360ee..54834dbe6b59 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -79,7 +79,7 @@ static int alloc_info_private(struct snd_info_entry *entry, return -ENODEV; if (!try_module_get(entry->module)) return -EFAULT; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) { module_put(entry->module); return -ENOMEM; @@ -311,7 +311,7 @@ static ssize_t snd_info_text_entry_write(struct file *file, guard(mutex)(&entry->access); buf = data->wbuffer; if (!buf) { - data->wbuffer = buf = kzalloc_obj(*buf, GFP_KERNEL); + data->wbuffer = buf = kzalloc_obj(*buf); if (!buf) return -ENOMEM; } @@ -355,7 +355,7 @@ static int snd_info_text_entry_open(struct inode *inode, struct file *file) if (err < 0) return err; - data->rbuffer = kzalloc_obj(*data->rbuffer, GFP_KERNEL); + data->rbuffer = kzalloc_obj(*data->rbuffer); if (!data->rbuffer) { err = -ENOMEM; goto error; @@ -663,7 +663,7 @@ snd_info_create_entry(const char *name, struct snd_info_entry *parent, struct module *module) { struct snd_info_entry *entry; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (entry == NULL) return NULL; entry->name = kstrdup(name, GFP_KERNEL); diff --git a/sound/core/init.c b/sound/core/init.c index 84c11bd49a95..2f1bd9cbdbed 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -129,7 +129,7 @@ int snd_device_alloc(struct device **dev_p, struct snd_card *card) struct device *dev; *dev_p = NULL; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return -ENOMEM; device_initialize(dev); @@ -1060,7 +1060,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file) { struct snd_monitor_file *mfile; - mfile = kmalloc_obj(*mfile, GFP_KERNEL); + mfile = kmalloc_obj(*mfile); if (mfile == NULL) return -ENOMEM; mfile->file = file; diff --git a/sound/core/jack.c b/sound/core/jack.c index 7160c260d06c..5e8a2f3f4196 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -440,7 +440,7 @@ static struct snd_jack_kctl * snd_jack_kctl_new(struct snd_card *card, const cha if (err < 0) return NULL; - jack_kctl = kzalloc_obj(*jack_kctl, GFP_KERNEL); + jack_kctl = kzalloc_obj(*jack_kctl); if (!jack_kctl) goto error; @@ -516,7 +516,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type, return -ENOMEM; } - jack = kzalloc_obj(struct snd_jack, GFP_KERNEL); + jack = kzalloc_obj(struct snd_jack); if (jack == NULL) return -ENOMEM; diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index bb483a2d7ff2..9320671dfcc8 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -719,12 +719,12 @@ static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size) unsigned int idx, npages; void *p; - sgbuf = kzalloc_obj(*sgbuf, GFP_KERNEL); + sgbuf = kzalloc_obj(*sgbuf); if (!sgbuf) return NULL; size = PAGE_ALIGN(size); sgbuf->count = size >> PAGE_SHIFT; - sgbuf->pages = kvzalloc_objs(*sgbuf->pages, sgbuf->count, GFP_KERNEL); + sgbuf->pages = kvzalloc_objs(*sgbuf->pages, sgbuf->count); sgbuf->npages = kvcalloc(sgbuf->count, sizeof(*sgbuf->npages), GFP_KERNEL); if (!sgbuf->pages || !sgbuf->npages) goto error; diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 05c8e44cd428..591cff800329 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -47,7 +47,7 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file) snd_card_unref(card); return err; } - fmixer = kzalloc_obj(*fmixer, GFP_KERNEL); + fmixer = kzalloc_obj(*fmixer); if (fmixer == NULL) { snd_card_file_remove(card, file); snd_card_unref(card); @@ -530,9 +530,9 @@ static void snd_mixer_oss_get_volume1_vol(struct snd_mixer_oss_file *fmixer, return; struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (uinfo == NULL || uctl == NULL) return; if (kctl->info(kctl, uinfo)) @@ -566,9 +566,9 @@ static void snd_mixer_oss_get_volume1_sw(struct snd_mixer_oss_file *fmixer, return; struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (uinfo == NULL || uctl == NULL) return; if (kctl->info(kctl, uinfo)) @@ -629,9 +629,9 @@ static void snd_mixer_oss_put_volume1_vol(struct snd_mixer_oss_file *fmixer, return; struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (uinfo == NULL || uctl == NULL) return; if (kctl->info(kctl, uinfo)) @@ -669,9 +669,9 @@ static void snd_mixer_oss_put_volume1_sw(struct snd_mixer_oss_file *fmixer, return; struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (uinfo == NULL || uctl == NULL) return; if (kctl->info(kctl, uinfo)) @@ -798,9 +798,9 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int err, idx; struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (uinfo == NULL || uctl == NULL) return -ENOMEM; guard(rwsem_read)(&card->controls_rwsem); @@ -843,9 +843,9 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned unsigned int idx; struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (uinfo == NULL || uctl == NULL) return -ENOMEM; guard(rwsem_read)(&card->controls_rwsem); @@ -1027,7 +1027,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0); if (kctl) { struct snd_ctl_elem_info *uinfo __free(kfree) = - kzalloc_obj(*uinfo, GFP_KERNEL); + kzalloc_obj(*uinfo); if (!uinfo) return -ENOMEM; @@ -1055,7 +1055,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, } } if (slot.present != 0) { - pslot = kmalloc_obj(slot, GFP_KERNEL); + pslot = kmalloc_obj(slot); if (! pslot) return -ENOMEM; *pslot = slot; @@ -1315,7 +1315,7 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd) if (cmd == SND_MIXER_OSS_NOTIFY_REGISTER) { int idx, err; - mixer = kzalloc_objs(*mixer, 2, GFP_KERNEL); + mixer = kzalloc_objs(*mixer, 2); if (mixer == NULL) return -ENOMEM; mutex_init(&mixer->reg_mutex); diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index cf3509c2be15..d4fd4dfc7fc3 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -398,7 +398,7 @@ static int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, } struct snd_pcm_hw_params *save __free(kfree) = - kmalloc_obj(*save, GFP_KERNEL); + kmalloc_obj(*save); if (save == NULL) return -ENOMEM; *save = *params; @@ -411,7 +411,7 @@ static int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, goto _end; struct snd_pcm_hw_params *params1 __free(kfree) = - kmalloc_obj(*params1, GFP_KERNEL); + kmalloc_obj(*params1); if (params1 == NULL) return -ENOMEM; *params1 = *save; @@ -786,7 +786,7 @@ static int choose_rate(struct snd_pcm_substream *substream, unsigned int rate, prev; struct snd_pcm_hw_params *save __free(kfree) = - kmalloc_obj(*save, GFP_KERNEL); + kmalloc_obj(*save); if (save == NULL) return -ENOMEM; *save = *params; @@ -861,9 +861,9 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream) if (!runtime->oss.params) return 0; - sw_params = kzalloc_obj(*sw_params, GFP_KERNEL); - params = kmalloc_obj(*params, GFP_KERNEL); - sparams = kmalloc_obj(*sparams, GFP_KERNEL); + sw_params = kzalloc_obj(*sw_params); + params = kmalloc_obj(*params); + sparams = kmalloc_obj(*sparams); if (!sw_params || !params || !sparams) { err = -ENOMEM; goto failure; @@ -1859,7 +1859,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file) AFMT_S24_PACKED; struct snd_pcm_hw_params *params __free(kfree) = - kmalloc_obj(*params, GFP_KERNEL); + kmalloc_obj(*params); if (!params) return -ENOMEM; _snd_pcm_hw_params_any(params); @@ -2418,7 +2418,7 @@ static int snd_pcm_oss_open_file(struct file *file, if (rpcm_oss_file) *rpcm_oss_file = NULL; - pcm_oss_file = kzalloc_obj(*pcm_oss_file, GFP_KERNEL); + pcm_oss_file = kzalloc_obj(*pcm_oss_file); if (pcm_oss_file == NULL) return -ENOMEM; @@ -3032,7 +3032,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, } } while (*str); if (setup == NULL) { - setup = kmalloc_obj(*setup, GFP_KERNEL); + setup = kmalloc_obj(*setup); if (! setup) { buffer->error = -ENOMEM; return; diff --git a/sound/core/pcm.c b/sound/core/pcm.c index e3c43b365207..bfedf571e021 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -334,7 +334,7 @@ static void snd_pcm_proc_info_read(struct snd_pcm_substream *substream, return; struct snd_pcm_info *info __free(kfree) = - kmalloc_obj(*info, GFP_KERNEL); + kmalloc_obj(*info); if (!info) return; @@ -657,7 +657,7 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) } prev = NULL; for (idx = 0, prev = NULL; idx < substream_count; idx++) { - substream = kzalloc_obj(*substream, GFP_KERNEL); + substream = kzalloc_obj(*substream); if (!substream) return -ENOMEM; substream->pcm = pcm; @@ -713,7 +713,7 @@ static int _snd_pcm_new(struct snd_card *card, const char *id, int device, return -ENXIO; if (rpcm) *rpcm = NULL; - pcm = kzalloc_obj(*pcm, GFP_KERNEL); + pcm = kzalloc_obj(*pcm); if (!pcm) return -ENOMEM; pcm->card = card; @@ -935,7 +935,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, if (substream == NULL) return -EAGAIN; - runtime = kzalloc_obj(*runtime, GFP_KERNEL); + runtime = kzalloc_obj(*runtime); if (runtime == NULL) return -ENOMEM; diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c index 71c74830083e..e71f393d3b01 100644 --- a/sound/core/pcm_compat.c +++ b/sound/core/pcm_compat.c @@ -243,7 +243,7 @@ static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream, return -ENOTTY; struct snd_pcm_hw_params *data __free(kfree) = - kmalloc_obj(*data, GFP_KERNEL); + kmalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c index cc6ce33f4ff7..1306b04be171 100644 --- a/sound/core/pcm_dmaengine.c +++ b/sound/core/pcm_dmaengine.c @@ -318,7 +318,7 @@ int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, if (ret < 0) return ret; - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (!prtd) return -ENOMEM; diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 70f279865adc..09c421cd9319 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -2601,7 +2601,7 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream, if (WARN_ON(pcm->streams[stream].chmap_kctl)) return -EBUSY; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; info->pcm = pcm; diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 2ef02871f84f..cfe9f10e7359 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -448,7 +448,7 @@ int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size) /* dma_max=0 means the fixed size preallocation */ if (substream->dma_buffer.area && !substream->dma_max) return -ENOMEM; - dmab = kzalloc_obj(*dmab, GFP_KERNEL); + dmab = kzalloc_obj(*dmab); if (! dmab) return -ENOMEM; dmab->dev = substream->dma_buffer.dev; diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index a7e24be8c7db..67cf6a0e17ba 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -244,7 +244,7 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream, { int err; struct snd_pcm_info *info __free(kfree) = - kmalloc_obj(*info, GFP_KERNEL); + kmalloc_obj(*info); if (! info) return -ENOMEM; @@ -2812,7 +2812,7 @@ static int snd_pcm_open_file(struct file *file, if (err < 0) return err; - pcm_file = kzalloc_obj(*pcm_file, GFP_KERNEL); + pcm_file = kzalloc_obj(*pcm_file); if (pcm_file == NULL) { snd_pcm_release_substream(substream); return -ENOMEM; @@ -4111,7 +4111,7 @@ static int snd_pcm_hw_refine_old_user(struct snd_pcm_substream *substream, int err; struct snd_pcm_hw_params *params __free(kfree) = - kmalloc_obj(*params, GFP_KERNEL); + kmalloc_obj(*params); if (!params) return -ENOMEM; @@ -4140,7 +4140,7 @@ static int snd_pcm_hw_params_old_user(struct snd_pcm_substream *substream, int err; struct snd_pcm_hw_params *params __free(kfree) = - kmalloc_obj(*params, GFP_KERNEL); + kmalloc_obj(*params); if (!params) return -ENOMEM; diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index ae93d968e083..3b1034a44938 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -159,7 +159,7 @@ static int snd_rawmidi_runtime_create(struct snd_rawmidi_substream *substream) { struct snd_rawmidi_runtime *runtime; - runtime = kzalloc_obj(*runtime, GFP_KERNEL); + runtime = kzalloc_obj(*runtime); if (!runtime) return -ENOMEM; runtime->substream = substream; @@ -472,7 +472,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file) fflags = snd_rawmidi_file_flags(file); if ((file->f_flags & O_APPEND) || maj == SOUND_MAJOR) /* OSS emul? */ fflags |= SNDRV_RAWMIDI_LFLG_APPEND; - rawmidi_file = kmalloc_obj(*rawmidi_file, GFP_KERNEL); + rawmidi_file = kmalloc_obj(*rawmidi_file); if (rawmidi_file == NULL) { err = -ENOMEM; goto __error; @@ -1803,7 +1803,7 @@ static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi, int idx; for (idx = 0; idx < count; idx++) { - substream = kzalloc_obj(*substream, GFP_KERNEL); + substream = kzalloc_obj(*substream); if (!substream) return -ENOMEM; substream->stream = direction; @@ -1891,7 +1891,7 @@ int snd_rawmidi_new(struct snd_card *card, char *id, int device, if (rrawmidi) *rrawmidi = NULL; - rmidi = kzalloc_obj(*rmidi, GFP_KERNEL); + rmidi = kzalloc_obj(*rmidi); if (!rmidi) return -ENOMEM; err = snd_rawmidi_init(rmidi, card, id, device, diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index af8e14325239..d3e6a8a8d823 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -65,7 +65,7 @@ snd_seq_oss_create_client(void) int rc; struct snd_seq_port_callback port_callback; struct snd_seq_port_info *port __free(kfree) = - kzalloc_obj(*port, GFP_KERNEL); + kzalloc_obj(*port); if (!port) return -ENOMEM; @@ -168,7 +168,7 @@ snd_seq_oss_open(struct file *file, int level) int i, rc; struct seq_oss_devinfo *dp; - dp = kzalloc_obj(*dp, GFP_KERNEL); + dp = kzalloc_obj(*dp); if (!dp) return -ENOMEM; diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c index 989e9a7069e3..b50a49ca42ff 100644 --- a/sound/core/seq/oss/seq_oss_midi.c +++ b/sound/core/seq/oss/seq_oss_midi.c @@ -66,9 +66,9 @@ int snd_seq_oss_midi_lookup_ports(int client) { struct snd_seq_client_info *clinfo __free(kfree) = - kzalloc_obj(*clinfo, GFP_KERNEL); + kzalloc_obj(*clinfo); struct snd_seq_port_info *pinfo __free(kfree) = - kzalloc_obj(*pinfo, GFP_KERNEL); + kzalloc_obj(*pinfo); if (!clinfo || !pinfo) return -ENOMEM; @@ -153,7 +153,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo) /* * allocate midi info record */ - mdev = kzalloc_obj(*mdev, GFP_KERNEL); + mdev = kzalloc_obj(*mdev); if (!mdev) return -ENOMEM; diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c index 014efc191c71..c880d4771169 100644 --- a/sound/core/seq/oss/seq_oss_readq.c +++ b/sound/core/seq/oss/seq_oss_readq.c @@ -34,11 +34,11 @@ snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen) { struct seq_oss_readq *q; - q = kzalloc_obj(*q, GFP_KERNEL); + q = kzalloc_obj(*q); if (!q) return NULL; - q->q = kzalloc_objs(union evrec, maxlen, GFP_KERNEL); + q->q = kzalloc_objs(union evrec, maxlen); if (!q->q) { kfree(q); return NULL; diff --git a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c index 32f1ff225cf5..44c04795204e 100644 --- a/sound/core/seq/oss/seq_oss_timer.c +++ b/sound/core/seq/oss/seq_oss_timer.c @@ -34,7 +34,7 @@ snd_seq_oss_timer_new(struct seq_oss_devinfo *dp) { struct seq_oss_timer *rec; - rec = kzalloc_obj(*rec, GFP_KERNEL); + rec = kzalloc_obj(*rec); if (rec == NULL) return NULL; diff --git a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c index dfc20d9bcc30..09239ea4b5ea 100644 --- a/sound/core/seq/oss/seq_oss_writeq.c +++ b/sound/core/seq/oss/seq_oss_writeq.c @@ -27,7 +27,7 @@ snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen) struct seq_oss_writeq *q; struct snd_seq_client_pool pool; - q = kzalloc_obj(*q, GFP_KERNEL); + q = kzalloc_obj(*q); if (!q) return NULL; q->dp = dp; diff --git a/sound/core/seq/seq_compat.c b/sound/core/seq/seq_compat.c index a771684eac34..22679dca9aae 100644 --- a/sound/core/seq/seq_compat.c +++ b/sound/core/seq/seq_compat.c @@ -33,7 +33,7 @@ static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned { int err; struct snd_seq_port_info *data __free(kfree) = - kmalloc_obj(*data, GFP_KERNEL); + kmalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c index d8b77385aa3f..af45f328ae99 100644 --- a/sound/core/seq/seq_dummy.c +++ b/sound/core/seq/seq_dummy.c @@ -115,7 +115,7 @@ create_port(int idx, int type) struct snd_seq_port_callback pcb; struct snd_seq_dummy_port *rec; - rec = kzalloc_obj(*rec, GFP_KERNEL); + rec = kzalloc_obj(*rec); if (!rec) return NULL; diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c index ad15d001cef7..ebe1394c18a9 100644 --- a/sound/core/seq/seq_fifo.c +++ b/sound/core/seq/seq_fifo.c @@ -19,7 +19,7 @@ struct snd_seq_fifo *snd_seq_fifo_new(int poolsize) { struct snd_seq_fifo *f; - f = kzalloc_obj(*f, GFP_KERNEL); + f = kzalloc_obj(*f); if (!f) return NULL; diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index 8a14d6e59c82..48b0aa0c3395 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -517,7 +517,7 @@ struct snd_seq_pool *snd_seq_pool_new(int poolsize) struct snd_seq_pool *pool; /* create pool block */ - pool = kzalloc_obj(*pool, GFP_KERNEL); + pool = kzalloc_obj(*pool); if (!pool) return NULL; spin_lock_init(&pool->lock); diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index 72e798ddbe4e..ca3f5fc30992 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -281,7 +281,7 @@ snd_seq_midisynth_probe(struct snd_seq_device *dev) return -EINVAL; struct snd_rawmidi_info *info __free(kfree) = - kmalloc_obj(*info, GFP_KERNEL); + kmalloc_obj(*info); if (! info) return -ENOMEM; info->device = device; @@ -305,7 +305,7 @@ snd_seq_midisynth_probe(struct snd_seq_device *dev) client = synths[card->number]; if (client == NULL) { newclient = 1; - client = kzalloc_obj(*client, GFP_KERNEL); + client = kzalloc_obj(*client); if (client == NULL) return -ENOMEM; client->seq_client = @@ -318,10 +318,10 @@ snd_seq_midisynth_probe(struct snd_seq_device *dev) } } - msynth = kzalloc_objs(struct seq_midisynth, ports, GFP_KERNEL); + msynth = kzalloc_objs(struct seq_midisynth, ports); struct snd_seq_port_info *port __free(kfree) = - kmalloc_obj(*port, GFP_KERNEL); + kmalloc_obj(*port); if (msynth == NULL || port == NULL) goto __nomem; diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c index 0e9461d0f9f8..fd067c85c524 100644 --- a/sound/core/seq/seq_midi_emul.c +++ b/sound/core/seq/seq_midi_emul.c @@ -650,7 +650,7 @@ static struct snd_midi_channel *snd_midi_channel_init_set(int n) struct snd_midi_channel *chan; int i; - chan = kmalloc_objs(struct snd_midi_channel, n, GFP_KERNEL); + chan = kmalloc_objs(struct snd_midi_channel, n); if (chan) { for (i = 0; i < n; i++) snd_midi_channel_init(chan+i, i); @@ -688,7 +688,7 @@ struct snd_midi_channel_set *snd_midi_channel_alloc_set(int n) { struct snd_midi_channel_set *chset; - chset = kmalloc_obj(*chset, GFP_KERNEL); + chset = kmalloc_obj(*chset); if (chset) { chset->channels = snd_midi_channel_init_set(n); chset->private_data = NULL; diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c index c2a9b0540c09..0d9269b47b59 100644 --- a/sound/core/seq/seq_midi_event.c +++ b/sound/core/seq/seq_midi_event.c @@ -104,7 +104,7 @@ int snd_midi_event_new(int bufsize, struct snd_midi_event **rdev) struct snd_midi_event *dev; *rdev = NULL; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (dev == NULL) return -ENOMEM; if (bufsize > 0) { diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index 1b395caaae49..da8d358958f1 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -129,7 +129,7 @@ int snd_seq_create_port(struct snd_seq_client *client, int port, } /* create a new port */ - new_port = kzalloc_obj(*new_port, GFP_KERNEL); + new_port = kzalloc_obj(*new_port); if (!new_port) return -ENOMEM; /* failure, out of memory */ /* init port data */ @@ -572,7 +572,7 @@ int snd_seq_port_connect(struct snd_seq_client *connector, bool exclusive; int err; - subs = kzalloc_obj(*subs, GFP_KERNEL); + subs = kzalloc_obj(*subs); if (!subs) return -ENOMEM; diff --git a/sound/core/seq/seq_prioq.c b/sound/core/seq/seq_prioq.c index 805c4ebbfdac..25c0ed8f9f0f 100644 --- a/sound/core/seq/seq_prioq.c +++ b/sound/core/seq/seq_prioq.c @@ -43,7 +43,7 @@ struct snd_seq_prioq *snd_seq_prioq_new(void) { struct snd_seq_prioq *f; - f = kzalloc_obj(*f, GFP_KERNEL); + f = kzalloc_obj(*f); if (!f) return NULL; diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c index 8c7b24a9421a..2c420d249c96 100644 --- a/sound/core/seq/seq_queue.c +++ b/sound/core/seq/seq_queue.c @@ -89,7 +89,7 @@ static struct snd_seq_queue *queue_new(int owner, int locked) { struct snd_seq_queue *q; - q = kzalloc_obj(*q, GFP_KERNEL); + q = kzalloc_obj(*q); if (!q) return NULL; diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c index d7d84576c3d6..f6132a120048 100644 --- a/sound/core/seq/seq_system.c +++ b/sound/core/seq/seq_system.c @@ -130,7 +130,7 @@ int __init snd_seq_system_client_init(void) struct snd_seq_port_info *port; int err; - port = kzalloc_obj(*port, GFP_KERNEL); + port = kzalloc_obj(*port); if (!port) return -ENOMEM; diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c index c5728efa05af..9bef2f792498 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c @@ -43,7 +43,7 @@ struct snd_seq_timer *snd_seq_timer_new(void) { struct snd_seq_timer *tmr; - tmr = kzalloc_obj(*tmr, GFP_KERNEL); + tmr = kzalloc_obj(*tmr); if (!tmr) return NULL; spin_lock_init(&tmr->lock); diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c index 3ca808c787e2..fdc76f23e03f 100644 --- a/sound/core/seq/seq_ump_client.c +++ b/sound/core/seq/seq_ump_client.c @@ -220,7 +220,7 @@ static int seq_ump_group_init(struct seq_ump_client *client, int group_index) return 0; struct snd_seq_port_info *port __free(kfree) = - kzalloc_obj(*port, GFP_KERNEL); + kzalloc_obj(*port); if (!port) return -ENOMEM; @@ -246,9 +246,9 @@ static void update_port_infos(struct seq_ump_client *client) int i, err; struct snd_seq_port_info *old __free(kfree) = - kzalloc_obj(*old, GFP_KERNEL); + kzalloc_obj(*old); struct snd_seq_port_info *new __free(kfree) = - kzalloc_obj(*new, GFP_KERNEL); + kzalloc_obj(*new); if (!old || !new) return; @@ -283,7 +283,7 @@ static int create_ump_endpoint_port(struct seq_ump_client *client) int err; struct snd_seq_port_info *port __free(kfree) = - kzalloc_obj(*port, GFP_KERNEL); + kzalloc_obj(*port); if (!port) return -ENOMEM; @@ -461,7 +461,7 @@ static int snd_seq_ump_probe(struct snd_seq_device *dev) struct snd_seq_client *cptr; int p, err; - client = kzalloc_obj(*client, GFP_KERNEL); + client = kzalloc_obj(*client); if (!client) return -ENOMEM; diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index 16d61847c7fe..982828650d41 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c @@ -216,7 +216,7 @@ static int snd_virmidi_output_open(struct snd_rawmidi_substream *substream) struct snd_rawmidi_runtime *runtime = substream->runtime; struct snd_virmidi *vmidi; - vmidi = kzalloc_obj(*vmidi, GFP_KERNEL); + vmidi = kzalloc_obj(*vmidi); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; @@ -367,7 +367,7 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev) return 0; struct snd_seq_port_info *pinfo __free(kfree) = - kzalloc_obj(*pinfo, GFP_KERNEL); + kzalloc_obj(*pinfo); if (!pinfo) return -ENOMEM; @@ -498,7 +498,7 @@ int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmi if (err < 0) return err; strscpy(rmidi->name, rmidi->id); - rdev = kzalloc_obj(*rdev, GFP_KERNEL); + rdev = kzalloc_obj(*rdev); if (rdev == NULL) { snd_device_free(card, rmidi); return -ENOMEM; diff --git a/sound/core/sound.c b/sound/core/sound.c index 876fac770749..93436db24710 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -257,7 +257,7 @@ int snd_register_device(int type, struct snd_card *card, int dev, if (snd_BUG_ON(!device)) return -EINVAL; - preg = kmalloc_obj(*preg, GFP_KERNEL); + preg = kmalloc_obj(*preg); if (preg == NULL) return -ENOMEM; preg->type = type; diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 6d4e44656e19..7eb49f2cada5 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -96,7 +96,7 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev, return 0; /* ignore silently */ if (minor < 0) return minor; - preg = kmalloc_obj(struct snd_minor, GFP_KERNEL); + preg = kmalloc_obj(struct snd_minor); if (preg == NULL) return -ENOMEM; preg->type = type; diff --git a/sound/core/timer.c b/sound/core/timer.c index 7d10f079b5b3..6a70df7ae019 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -151,7 +151,7 @@ struct snd_timer_instance *snd_timer_instance_new(const char *owner) { struct snd_timer_instance *timeri; - timeri = kzalloc_obj(*timeri, GFP_KERNEL); + timeri = kzalloc_obj(*timeri); if (timeri == NULL) return NULL; timeri->owner = kstrdup(owner, GFP_KERNEL); @@ -930,7 +930,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, } if (rtimer) *rtimer = NULL; - timer = kzalloc_obj(*timer, GFP_KERNEL); + timer = kzalloc_obj(*timer); if (!timer) return -ENOMEM; timer->tmr_class = tid->dev_class; @@ -1197,7 +1197,7 @@ static int snd_timer_register_system(void) return err; strscpy(timer->name, "system timer"); timer->hw = snd_timer_system; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (priv == NULL) { snd_timer_free(timer); return -ENOMEM; @@ -1432,11 +1432,11 @@ static int realloc_user_queue(struct snd_timer_user *tu, int size) struct snd_timer_tread64 *tqueue = NULL; if (tu->tread) { - tqueue = kzalloc_objs(*tqueue, size, GFP_KERNEL); + tqueue = kzalloc_objs(*tqueue, size); if (!tqueue) return -ENOMEM; } else { - queue = kzalloc_objs(*queue, size, GFP_KERNEL); + queue = kzalloc_objs(*queue, size); if (!queue) return -ENOMEM; } @@ -1461,7 +1461,7 @@ static int snd_timer_user_open(struct inode *inode, struct file *file) if (err < 0) return err; - tu = kzalloc_obj(*tu, GFP_KERNEL); + tu = kzalloc_obj(*tu); if (tu == NULL) return -ENOMEM; spin_lock_init(&tu->qlock); @@ -2128,7 +2128,7 @@ static int snd_utimer_create(struct snd_timer_uinfo *utimer_info, if (!utimer_info || utimer_info->resolution == 0) return -EINVAL; - utimer = kzalloc_obj(*utimer, GFP_KERNEL); + utimer = kzalloc_obj(*utimer); if (!utimer) return -ENOMEM; diff --git a/sound/core/ump.c b/sound/core/ump.c index 543330c67b69..114ebf8c3a51 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -166,7 +166,7 @@ int snd_ump_endpoint_new(struct snd_card *card, char *id, int device, if (input && output) info_flags |= SNDRV_RAWMIDI_INFO_DUPLEX; - ump = kzalloc_obj(*ump, GFP_KERNEL); + ump = kzalloc_obj(*ump); if (!ump) return -ENOMEM; INIT_LIST_HEAD(&ump->block_list); @@ -408,7 +408,7 @@ int snd_ump_block_new(struct snd_ump_endpoint *ump, unsigned int blk, if (snd_ump_get_block(ump, blk)) return -EBUSY; - fb = kzalloc_obj(*fb, GFP_KERNEL); + fb = kzalloc_obj(*fb); if (!fb) return -ENOMEM; diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c index e4185c3a2629..fe7683c9c31a 100644 --- a/sound/core/vmaster.c +++ b/sound/core/vmaster.c @@ -58,7 +58,7 @@ static int follower_update(struct link_follower *follower) { int err, ch; struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (!uctl) return -ENOMEM; @@ -84,7 +84,7 @@ static int follower_init(struct link_follower *follower) } struct snd_ctl_elem_info *uinfo __free(kfree) = - kmalloc_obj(*uinfo, GFP_KERNEL); + kmalloc_obj(*uinfo); if (!uinfo) return -ENOMEM; uinfo->id = follower->follower.id; @@ -341,7 +341,7 @@ static int sync_followers(struct link_master *master, int old_val, int new_val) { struct link_follower *follower; struct snd_ctl_elem_value *uval __free(kfree) = - kmalloc_obj(*uval, GFP_KERNEL); + kmalloc_obj(*uval); if (!uval) return -ENOMEM; @@ -429,7 +429,7 @@ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, knew.name = name; knew.info = master_info; - master = kzalloc_obj(*master, GFP_KERNEL); + master = kzalloc_obj(*master); if (!master) return NULL; INIT_LIST_HEAD(&master->followers); diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 33323c1f8dfe..7283f0f18813 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -329,7 +329,7 @@ static int dummy_systimer_create(struct snd_pcm_substream *substream) { struct dummy_systimer_pcm *dpcm; - dpcm = kzalloc_obj(*dpcm, GFP_KERNEL); + dpcm = kzalloc_obj(*dpcm); if (!dpcm) return -ENOMEM; substream->runtime->private_data = dpcm; @@ -450,7 +450,7 @@ static int dummy_hrtimer_create(struct snd_pcm_substream *substream) { struct dummy_hrtimer_pcm *dpcm; - dpcm = kzalloc_obj(*dpcm, GFP_KERNEL); + dpcm = kzalloc_obj(*dpcm); if (!dpcm) return -ENOMEM; substream->runtime->private_data = dpcm; diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 1b573969918f..6de03d72a908 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -518,7 +518,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device, out_enable, in_enable, &rmidi); if (err < 0) return err; - mpu = kzalloc_obj(*mpu, GFP_KERNEL); + mpu = kzalloc_obj(*mpu); if (!mpu) { err = -ENOMEM; goto free_device; diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index eeaa05ad9e5b..36e9eab204ca 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -75,7 +75,7 @@ static int snd_mts64_create(struct snd_card *card, *rchip = NULL; - mts = kzalloc_obj(struct mts64, GFP_KERNEL); + mts = kzalloc_obj(struct mts64); if (mts == NULL) return -ENOMEM; diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index ce96b0fd1f43..ea9b258b1e4b 100644 --- a/sound/drivers/opl3/opl3_lib.c +++ b/sound/drivers/opl3/opl3_lib.c @@ -324,7 +324,7 @@ int snd_opl3_new(struct snd_card *card, int err; *ropl3 = NULL; - opl3 = kzalloc_obj(*opl3, GFP_KERNEL); + opl3 = kzalloc_obj(*opl3); if (!opl3) return -ENOMEM; diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index 7cdd4abb0b7c..47a2486be46d 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -313,7 +313,7 @@ struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank, if (!create_patch) return NULL; - patch = kzalloc_obj(*patch, GFP_KERNEL); + patch = kzalloc_obj(*patch); if (!patch) return NULL; patch->prog = prog; diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index d476fb7be15e..6364475a368a 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c @@ -187,7 +187,7 @@ int snd_opl4_create(struct snd_card *card, if (ropl4) *ropl4 = NULL; - opl4 = kzalloc_obj(*opl4, GFP_KERNEL); + opl4 = kzalloc_obj(*opl4); if (!opl4) return -ENOMEM; diff --git a/sound/drivers/pcmtest.c b/sound/drivers/pcmtest.c index 8d3a19b628a2..768bb698adfb 100644 --- a/sound/drivers/pcmtest.c +++ b/sound/drivers/pcmtest.c @@ -377,7 +377,7 @@ static int snd_pcmtst_pcm_open(struct snd_pcm_substream *substream) if (inject_open_err) return -EBUSY; - v_iter = kzalloc_obj(*v_iter, GFP_KERNEL); + v_iter = kzalloc_obj(*v_iter); if (!v_iter) return -ENOMEM; @@ -575,7 +575,7 @@ static int snd_pcmtst_create(struct snd_card *card, struct platform_device *pdev .dev_free = snd_pcmtst_dev_free, }; - pcmtst = kzalloc_obj(*pcmtst, GFP_KERNEL); + pcmtst = kzalloc_obj(*pcmtst); if (!pcmtst) return -ENOMEM; pcmtst->card = card; diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index 3dac519c4c45..dcc0899cfb99 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -88,7 +88,7 @@ static int portman_create(struct snd_card *card, *rchip = NULL; - pm = kzalloc_obj(struct portman, GFP_KERNEL); + pm = kzalloc_obj(struct portman); if (pm == NULL) return -ENOMEM; diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 0e7a4cdc1390..d337f5990e5c 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -414,7 +414,7 @@ static int vx_alloc_pipe(struct vx_core *chip, int capture, return err; /* initialize the pipe record */ - pipe = kzalloc_obj(*pipe, GFP_KERNEL); + pipe = kzalloc_obj(*pipe); if (! pipe) { /* release the pipe */ vx_init_rmh(&rmh, CMD_FREE_PIPE); diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 3f9471694b04..f33c08e7c659 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -1783,7 +1783,7 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed, // for runtime of PCM substream in the interval equivalent to the size of PCM buffer. It // could take a round over queue of AMDTP packet descriptors and small loss of history. For // safe, keep more 8 elements for the queue, equivalent to 1 ms. - descs = kzalloc_objs(*descs, s->queue_size + 8, GFP_KERNEL); + descs = kzalloc_objs(*descs, s->queue_size + 8); if (!descs) { err = -ENOMEM; goto err_context; diff --git a/sound/firewire/bebob/bebob_proc.c b/sound/firewire/bebob/bebob_proc.c index c5e060728fdc..ad03734afcb1 100644 --- a/sound/firewire/bebob/bebob_proc.c +++ b/sound/firewire/bebob/bebob_proc.c @@ -38,7 +38,7 @@ proc_read_hw_info(struct snd_info_entry *entry, struct snd_bebob *bebob = entry->private_data; struct hw_info *info; - info = kzalloc_obj(struct hw_info, GFP_KERNEL); + info = kzalloc_obj(struct hw_info); if (info == NULL) return; diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c index 8b6b0e5ba497..d69435722abb 100644 --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c @@ -76,7 +76,7 @@ get_hardware_info(struct snd_efw *efw) char version[12] = {0}; int err; - hwinfo = kzalloc_obj(struct snd_efw_hwinfo, GFP_KERNEL); + hwinfo = kzalloc_obj(struct snd_efw_hwinfo); if (hwinfo == NULL) return -ENOMEM; diff --git a/sound/firewire/fireworks/fireworks_proc.c b/sound/firewire/fireworks/fireworks_proc.c index 179b7110c8e2..aba544b86b99 100644 --- a/sound/firewire/fireworks/fireworks_proc.c +++ b/sound/firewire/fireworks/fireworks_proc.c @@ -31,7 +31,7 @@ proc_read_hwinfo(struct snd_info_entry *entry, struct snd_info_buffer *buffer) unsigned short i; struct snd_efw_hwinfo *hwinfo; - hwinfo = kmalloc_obj(struct snd_efw_hwinfo, GFP_KERNEL); + hwinfo = kmalloc_obj(struct snd_efw_hwinfo); if (hwinfo == NULL) return; diff --git a/sound/firewire/motu/motu-hwdep.c b/sound/firewire/motu/motu-hwdep.c index ea7f5d215060..56a6f3493f6f 100644 --- a/sound/firewire/motu/motu-hwdep.c +++ b/sound/firewire/motu/motu-hwdep.c @@ -185,7 +185,7 @@ static int hwdep_ioctl(struct snd_hwdep *hwdep, struct file *file, if (!(motu->spec->flags & SND_MOTU_SPEC_REGISTER_DSP)) return -ENXIO; - meter = kzalloc_obj(*meter, GFP_KERNEL); + meter = kzalloc_obj(*meter); if (!meter) return -ENOMEM; @@ -207,7 +207,7 @@ static int hwdep_ioctl(struct snd_hwdep *hwdep, struct file *file, if (!(motu->spec->flags & SND_MOTU_SPEC_COMMAND_DSP)) return -ENXIO; - meter = kzalloc_obj(*meter, GFP_KERNEL); + meter = kzalloc_obj(*meter); if (!meter) return -ENOMEM; @@ -229,7 +229,7 @@ static int hwdep_ioctl(struct snd_hwdep *hwdep, struct file *file, if (!(motu->spec->flags & SND_MOTU_SPEC_REGISTER_DSP)) return -ENXIO; - param = kzalloc_obj(*param, GFP_KERNEL); + param = kzalloc_obj(*param); if (!param) return -ENOMEM; diff --git a/sound/firewire/packets-buffer.c b/sound/firewire/packets-buffer.c index 3d5c3baf7e48..2093a5fbd81d 100644 --- a/sound/firewire/packets-buffer.c +++ b/sound/firewire/packets-buffer.c @@ -27,7 +27,7 @@ int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit, void *p; int err; - b->packets = kmalloc_objs(*b->packets, count, GFP_KERNEL); + b->packets = kmalloc_objs(*b->packets, count); if (!b->packets) { err = -ENOMEM; goto error; diff --git a/sound/hda/codecs/analog.c b/sound/hda/codecs/analog.c index 122d14e57313..11b1d30b23fd 100644 --- a/sound/hda/codecs/analog.c +++ b/sound/hda/codecs/analog.c @@ -191,7 +191,7 @@ static int alloc_ad_spec(struct hda_codec *codec) { struct ad198x_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; codec->spec = spec; diff --git a/sound/hda/codecs/ca0110.c b/sound/hda/codecs/ca0110.c index 8638cef4ef20..d17fc38784e1 100644 --- a/sound/hda/codecs/ca0110.c +++ b/sound/hda/codecs/ca0110.c @@ -35,7 +35,7 @@ static int ca0110_probe(struct hda_codec *codec, const struct hda_device_id *id) struct hda_gen_spec *spec; int err; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; snd_hda_gen_spec_init(spec); diff --git a/sound/hda/codecs/ca0132.c b/sound/hda/codecs/ca0132.c index af9236c56db4..e4f174d0ebb1 100644 --- a/sound/hda/codecs/ca0132.c +++ b/sound/hda/codecs/ca0132.c @@ -3392,11 +3392,11 @@ static int dspxfr_image(struct hda_codec *codec, if (fls_data == NULL) return -EINVAL; - dma_engine = kzalloc_obj(*dma_engine, GFP_KERNEL); + dma_engine = kzalloc_obj(*dma_engine); if (!dma_engine) return -ENOMEM; - dma_engine->dmab = kzalloc_obj(*dma_engine->dmab, GFP_KERNEL); + dma_engine->dmab = kzalloc_obj(*dma_engine->dmab); if (!dma_engine->dmab) { kfree(dma_engine); return -ENOMEM; @@ -9899,7 +9899,7 @@ static int ca0132_codec_probe(struct hda_codec *codec, codec_dbg(codec, "%s\n", __func__); - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; codec->spec = spec; diff --git a/sound/hda/codecs/cirrus/cs420x.c b/sound/hda/codecs/cirrus/cs420x.c index 454b6946b4a3..52eda0a338ea 100644 --- a/sound/hda/codecs/cirrus/cs420x.c +++ b/sound/hda/codecs/cirrus/cs420x.c @@ -524,7 +524,7 @@ static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid) { struct cs_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return NULL; codec->spec = spec; diff --git a/sound/hda/codecs/cirrus/cs421x.c b/sound/hda/codecs/cirrus/cs421x.c index 28f3317a9ffd..c8349a2c5a36 100644 --- a/sound/hda/codecs/cirrus/cs421x.c +++ b/sound/hda/codecs/cirrus/cs421x.c @@ -162,7 +162,7 @@ static struct cs_spec *cs_alloc_spec(struct hda_codec *codec, int vendor_nid) { struct cs_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return NULL; codec->spec = spec; diff --git a/sound/hda/codecs/cirrus/cs8409.c b/sound/hda/codecs/cirrus/cs8409.c index 24b224c70e9f..fad705092777 100644 --- a/sound/hda/codecs/cirrus/cs8409.c +++ b/sound/hda/codecs/cirrus/cs8409.c @@ -61,7 +61,7 @@ static struct cs8409_spec *cs8409_alloc_spec(struct hda_codec *codec) { struct cs8409_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return NULL; codec->spec = spec; diff --git a/sound/hda/codecs/cm9825.c b/sound/hda/codecs/cm9825.c index a5330cff42ec..eeb9ca38d2d8 100644 --- a/sound/hda/codecs/cm9825.c +++ b/sound/hda/codecs/cm9825.c @@ -488,7 +488,7 @@ static int cm9825_probe(struct hda_codec *codec, const struct hda_device_id *id) struct auto_pin_cfg *cfg; int err = 0; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (spec == NULL) return -ENOMEM; diff --git a/sound/hda/codecs/cmedia.c b/sound/hda/codecs/cmedia.c index 0494bbe15431..e6e12c01339f 100644 --- a/sound/hda/codecs/cmedia.c +++ b/sound/hda/codecs/cmedia.c @@ -24,7 +24,7 @@ static int cmedia_probe(struct hda_codec *codec, const struct hda_device_id *id) bool is_cmi8888 = id->vendor_id == 0x13f68888; int err; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (spec == NULL) return -ENOMEM; diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c index 8f032102e558..aa726eb323eb 100644 --- a/sound/hda/codecs/conexant.c +++ b/sound/hda/codecs/conexant.c @@ -1187,7 +1187,7 @@ static int cx_probe(struct hda_codec *codec, const struct hda_device_id *id) codec_info(codec, "%s: BIOS auto-probing.\n", codec->core.chip_name); - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; snd_hda_gen_spec_init(&spec->gen); diff --git a/sound/hda/codecs/generic.c b/sound/hda/codecs/generic.c index 147582c5e51f..092428ada29d 100644 --- a/sound/hda/codecs/generic.c +++ b/sound/hda/codecs/generic.c @@ -1991,7 +1991,7 @@ static int parse_output_paths(struct hda_codec *codec) bool best_wired = true, best_mio = true; bool hp_spk_swapped = false; struct auto_pin_cfg *best_cfg __free(kfree) = - kmalloc_obj(*best_cfg, GFP_KERNEL); + kmalloc_obj(*best_cfg); if (!best_cfg) return -ENOMEM; @@ -6095,7 +6095,7 @@ static int snd_hda_gen_probe(struct hda_codec *codec, struct hda_gen_spec *spec; int err; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; snd_hda_gen_spec_init(spec); diff --git a/sound/hda/codecs/hdmi/hdmi.c b/sound/hda/codecs/hdmi/hdmi.c index bcc81018fff3..f20d1715da62 100644 --- a/sound/hda/codecs/hdmi/hdmi.c +++ b/sound/hda/codecs/hdmi/hdmi.c @@ -2105,7 +2105,7 @@ int snd_hda_hdmi_generic_alloc(struct hda_codec *codec) { struct hdmi_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; diff --git a/sound/hda/codecs/hdmi/simplehdmi.c b/sound/hda/codecs/hdmi/simplehdmi.c index fe4e73c3d6e6..7bb002113898 100644 --- a/sound/hda/codecs/hdmi/simplehdmi.c +++ b/sound/hda/codecs/hdmi/simplehdmi.c @@ -175,7 +175,7 @@ int snd_hda_hdmi_simple_probe(struct hda_codec *codec, struct hdmi_spec_per_cvt *per_cvt; struct hdmi_spec_per_pin *per_pin; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; diff --git a/sound/hda/codecs/realtek/realtek.c b/sound/hda/codecs/realtek/realtek.c index 3356fd95fb7f..aad265c0a5b6 100644 --- a/sound/hda/codecs/realtek/realtek.c +++ b/sound/hda/codecs/realtek/realtek.c @@ -221,7 +221,7 @@ void alc_update_knob_master(struct hda_codec *codec, return; struct snd_ctl_elem_value *uctl __free(kfree) = - kzalloc_obj(*uctl, GFP_KERNEL); + kzalloc_obj(*uctl); if (!uctl) return; val = snd_hda_codec_read(codec, jack->nid, 0, @@ -1028,7 +1028,7 @@ EXPORT_SYMBOL_NS_GPL(alc_parse_auto_config, "SND_HDA_CODEC_REALTEK"); /* common preparation job for alc_spec */ int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) { - struct alc_spec *spec = kzalloc_obj(*spec, GFP_KERNEL); + struct alc_spec *spec = kzalloc_obj(*spec); int err; if (!spec) diff --git a/sound/hda/codecs/senarytech.c b/sound/hda/codecs/senarytech.c index ed3d9cbb3ea6..3a50d4b3a064 100644 --- a/sound/hda/codecs/senarytech.c +++ b/sound/hda/codecs/senarytech.c @@ -170,7 +170,7 @@ static int senary_probe(struct hda_codec *codec, const struct hda_device_id *id) codec_info(codec, "%s: BIOS auto-probing.\n", codec->core.chip_name); - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; snd_hda_gen_spec_init(&spec->gen); diff --git a/sound/hda/codecs/si3054.c b/sound/hda/codecs/si3054.c index 9074c74a0ed0..471260e8deb1 100644 --- a/sound/hda/codecs/si3054.c +++ b/sound/hda/codecs/si3054.c @@ -256,7 +256,7 @@ static void si3054_remove(struct hda_codec *codec) static int si3054_probe(struct hda_codec *codec, const struct hda_device_id *id) { - codec->spec = kzalloc_obj(struct si3054_spec, GFP_KERNEL); + codec->spec = kzalloc_obj(struct si3054_spec); if (!codec->spec) return -ENOMEM; return 0; diff --git a/sound/hda/codecs/sigmatel.c b/sound/hda/codecs/sigmatel.c index 69d75cc63bd6..acbbc7c3508b 100644 --- a/sound/hda/codecs/sigmatel.c +++ b/sound/hda/codecs/sigmatel.c @@ -4456,7 +4456,7 @@ static int alloc_stac_spec(struct hda_codec *codec) { struct sigmatel_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; snd_hda_gen_spec_init(&spec->gen); diff --git a/sound/hda/codecs/via.c b/sound/hda/codecs/via.c index 42cce9f51931..807312cffd35 100644 --- a/sound/hda/codecs/via.c +++ b/sound/hda/codecs/via.c @@ -102,7 +102,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) { struct via_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (spec == NULL) return NULL; diff --git a/sound/hda/common/beep.c b/sound/hda/common/beep.c index 006eef5ceea8..4cb21ec9035c 100644 --- a/sound/hda/common/beep.c +++ b/sound/hda/common/beep.c @@ -220,7 +220,7 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) return 0; /* disabled by module option */ } - beep = kzalloc_obj(*beep, GFP_KERNEL); + beep = kzalloc_obj(*beep); if (beep == NULL) return -ENOMEM; snprintf(beep->phys, sizeof(beep->phys), diff --git a/sound/hda/common/codec.c b/sound/hda/common/codec.c index 6c787b603179..feebe56cba67 100644 --- a/sound/hda/common/codec.c +++ b/sound/hda/common/codec.c @@ -147,7 +147,7 @@ static int read_and_add_raw_conns(struct hda_codec *codec, hda_nid_t nid) len = snd_hda_get_raw_connections(codec, nid, list, ARRAY_SIZE(list)); if (len == -ENOSPC) { len = snd_hda_get_num_raw_conns(codec, nid); - result = kmalloc_objs(hda_nid_t, len, GFP_KERNEL); + result = kmalloc_objs(hda_nid_t, len); if (!result) return -ENOMEM; len = snd_hda_get_raw_connections(codec, nid, result, len); @@ -703,7 +703,7 @@ struct hda_pcm *snd_hda_codec_pcm_new(struct hda_codec *codec, struct hda_pcm *pcm; va_list args; - pcm = kzalloc_obj(*pcm, GFP_KERNEL); + pcm = kzalloc_obj(*pcm); if (!pcm) return NULL; @@ -895,7 +895,7 @@ snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr, if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) return ERR_PTR(-EINVAL); - codec = kzalloc_obj(*codec, GFP_KERNEL); + codec = kzalloc_obj(*codec); if (!codec) return ERR_PTR(-ENOMEM); @@ -1855,7 +1855,7 @@ static int check_follower_present(struct hda_codec *codec, static int put_kctl_with_value(struct snd_kcontrol *kctl, int val) { struct snd_ctl_elem_value *ucontrol __free(kfree) = - kzalloc_obj(*ucontrol, GFP_KERNEL); + kzalloc_obj(*ucontrol); if (!ucontrol) return -ENOMEM; diff --git a/sound/hda/common/controller.c b/sound/hda/common/controller.c index cf8502834484..5934e5cdfdfd 100644 --- a/sound/hda/common/controller.c +++ b/sound/hda/common/controller.c @@ -715,7 +715,7 @@ int snd_hda_attach_pcm_stream(struct hda_bus *_bus, struct hda_codec *codec, if (err < 0) return err; strscpy(pcm->name, cpcm->name, sizeof(pcm->name)); - apcm = kzalloc_obj(*apcm, GFP_KERNEL); + apcm = kzalloc_obj(*apcm); if (apcm == NULL) { snd_device_free(chip->card, pcm); return -ENOMEM; @@ -1283,7 +1283,7 @@ int azx_init_streams(struct azx *chip) * and initialize */ for (i = 0; i < chip->num_streams; i++) { - struct azx_dev *azx_dev = kzalloc_obj(*azx_dev, GFP_KERNEL); + struct azx_dev *azx_dev = kzalloc_obj(*azx_dev); int dir, tag; if (!azx_dev) diff --git a/sound/hda/common/jack.c b/sound/hda/common/jack.c index 87120868d123..98ba1c4d5ba4 100644 --- a/sound/hda/common/jack.c +++ b/sound/hda/common/jack.c @@ -329,7 +329,7 @@ snd_hda_jack_detect_enable_callback_mst(struct hda_codec *codec, hda_nid_t nid, callback = find_callback_from_list(jack, func); if (func && !callback) { - callback = kzalloc_obj(*callback, GFP_KERNEL); + callback = kzalloc_obj(*callback); if (!callback) return ERR_PTR(-ENOMEM); callback->func = func; diff --git a/sound/hda/common/proc.c b/sound/hda/common/proc.c index 98cad7ea8cf1..ce76b8190b9f 100644 --- a/sound/hda/common/proc.c +++ b/sound/hda/common/proc.c @@ -689,7 +689,7 @@ static void print_dpmst_connections(struct snd_info_buffer *buffer, struct hda_c if (conn_len <= 0) return; - conn = kmalloc_objs(hda_nid_t, conn_len, GFP_KERNEL); + conn = kmalloc_objs(hda_nid_t, conn_len); if (!conn) return; diff --git a/sound/hda/core/ext/controller.c b/sound/hda/core/ext/controller.c index 0c12ff36d992..b1f1eff1d181 100644 --- a/sound/hda/core/ext/controller.c +++ b/sound/hda/core/ext/controller.c @@ -89,7 +89,7 @@ int snd_hdac_ext_bus_get_ml_capabilities(struct hdac_bus *bus) dev_dbg(bus->dev, "In %s Link count: %d\n", __func__, link_count); for (idx = 0; idx < link_count; idx++) { - hlink = kzalloc_obj(*hlink, GFP_KERNEL); + hlink = kzalloc_obj(*hlink); if (!hlink) return -ENOMEM; hlink->index = idx; diff --git a/sound/hda/core/sysfs.c b/sound/hda/core/sysfs.c index 443f00d037a3..09d88f22957a 100644 --- a/sound/hda/core/sysfs.c +++ b/sound/hda/core/sysfs.c @@ -339,7 +339,7 @@ static int add_widget_node(struct kobject *parent, hda_nid_t nid, const struct attribute_group *group, struct kobject **res) { - struct kobject *kobj = kzalloc_obj(*kobj, GFP_KERNEL); + struct kobject *kobj = kzalloc_obj(*kobj); int err; if (!kobj) @@ -366,7 +366,7 @@ static int widget_tree_create(struct hdac_device *codec) int i, err; hda_nid_t nid; - tree = codec->widgets = kzalloc_obj(*tree, GFP_KERNEL); + tree = codec->widgets = kzalloc_obj(*tree); if (!tree) return -ENOMEM; @@ -436,7 +436,7 @@ int hda_widget_sysfs_reinit(struct hdac_device *codec, if (!tree) return -ENOMEM; - tree->nodes = kzalloc_objs(*tree->nodes, num_nodes + 1, GFP_KERNEL); + tree->nodes = kzalloc_objs(*tree->nodes, num_nodes + 1); if (!tree->nodes) { kfree(tree); return -ENOMEM; diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index a4717449cc2f..1de985ba85d9 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c @@ -269,7 +269,7 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, &device); if (err < 0) return err; - chip = device->private_data = kzalloc_obj(*chip, GFP_KERNEL); + chip = device->private_data = kzalloc_obj(*chip); if (chip == NULL) { snd_i2c_device_free(device); return -ENOMEM; diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c index 8bb49f0d97e6..46b201188c56 100644 --- a/sound/i2c/i2c.c +++ b/sound/i2c/i2c.c @@ -72,7 +72,7 @@ int snd_i2c_bus_create(struct snd_card *card, const char *name, }; *ri2c = NULL; - bus = kzalloc_obj(*bus, GFP_KERNEL); + bus = kzalloc_obj(*bus); if (bus == NULL) return -ENOMEM; mutex_init(&bus->lock_mutex); @@ -104,7 +104,7 @@ int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, *rdevice = NULL; if (snd_BUG_ON(!bus)) return -EINVAL; - device = kzalloc_obj(*device, GFP_KERNEL); + device = kzalloc_obj(*device); if (device == NULL) return -ENOMEM; device->addr = addr; diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index b1bfc71aab22..6ef5fffda8d7 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c @@ -64,7 +64,7 @@ int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, .dev_free = snd_ak4113_dev_free, }; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->lock); diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 6d51e2a8db2b..71efb29b6c7c 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c @@ -64,7 +64,7 @@ int snd_ak4114_create(struct snd_card *card, .dev_free = snd_ak4114_dev_free, }; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->lock); diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c index 8f4657aa6525..7ff3730d2a64 100644 --- a/sound/i2c/other/ak4117.c +++ b/sound/i2c/other/ak4117.c @@ -57,7 +57,7 @@ int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t .dev_free = snd_ak4117_dev_free, }; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->lock); diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c index b63dfc50c1c2..e8c50a036bea 100644 --- a/sound/i2c/tea6330t.c +++ b/sound/i2c/tea6330t.c @@ -285,7 +285,7 @@ int snd_tea6330t_update_mixer(struct snd_card *card, u8 default_treble, default_bass; unsigned char bytes[7]; - tea = kzalloc_obj(*tea, GFP_KERNEL); + tea = kzalloc_obj(*tea); if (tea == NULL) return -ENOMEM; err = snd_i2c_device_create(bus, "TEA6330T", TEA6330T_ADDR, &device); diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 0b6e56c16e38..b2b189c83569 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -116,7 +116,7 @@ int snd_gus_create(struct snd_card *card, }; *rgus = NULL; - gus = kzalloc_obj(*gus, GFP_KERNEL); + gus = kzalloc_obj(*gus); if (gus == NULL) return -ENOMEM; spin_lock_init(&gus->reg_lock); diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index 65e5426a43fd..927a2bc80511 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -21,7 +21,7 @@ snd_gf1_mem_xalloc(struct snd_gf1_mem *alloc, struct snd_gf1_mem_block *block, { struct snd_gf1_mem_block *pblock, *nblock; - nblock = kmalloc_obj(struct snd_gf1_mem_block, GFP_KERNEL); + nblock = kmalloc_obj(struct snd_gf1_mem_block); if (nblock == NULL) return NULL; *nblock = *block; diff --git a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c index fdb14acaddcf..04c212882718 100644 --- a/sound/isa/gus/gus_mem_proc.c +++ b/sound/isa/gus/gus_mem_proc.c @@ -50,7 +50,7 @@ int snd_gf1_mem_proc_init(struct snd_gus_card * gus) for (idx = 0; idx < 4; idx++) { if (gus->gf1.mem_alloc.banks_8[idx].size > 0) { - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (priv == NULL) return -ENOMEM; priv->gus = gus; @@ -67,7 +67,7 @@ int snd_gf1_mem_proc_init(struct snd_gus_card * gus) } for (idx = 0; idx < 4; idx++) { if (gus->gf1.rom_present & (1 << idx)) { - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (priv == NULL) return -ENOMEM; priv->rom = 1; diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index b5da8d970b3f..caf371897b78 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -638,7 +638,7 @@ static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; int err; - pcmp = kzalloc_obj(*pcmp, GFP_KERNEL); + pcmp = kzalloc_obj(*pcmp); if (pcmp == NULL) return -ENOMEM; pcmp->gus = gus; diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c index a3071cd2e9a8..d2ca70aad162 100644 --- a/sound/isa/sb/emu8000_pcm.c +++ b/sound/isa/sb/emu8000_pcm.c @@ -221,7 +221,7 @@ static int emu8k_pcm_open(struct snd_pcm_substream *subs) struct snd_emu8k_pcm *rec; struct snd_pcm_runtime *runtime = subs->runtime; - rec = kzalloc_obj(*rec, GFP_KERNEL); + rec = kzalloc_obj(*rec); if (! rec) return -ENOMEM; diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c index 834b38de9afd..bece60051e41 100644 --- a/sound/isa/sb/sb16_csp.c +++ b/sound/isa/sb/sb16_csp.c @@ -117,7 +117,7 @@ int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep) if (err < 0) return err; - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (!p) { snd_device_free(chip->card, hw); return -ENOMEM; diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 0b91b3b28f7f..33b563707a58 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -1381,7 +1381,7 @@ wavefront_load_patch (snd_wavefront_t *dev, const char __user *addr) wavefront_patch_info *header; int err; - header = kmalloc_obj(*header, GFP_KERNEL); + header = kmalloc_obj(*header); if (! header) return -ENOMEM; diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index c865c7ba3636..2beb6a0dc3b7 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c @@ -773,7 +773,7 @@ static int hal2_create(struct snd_card *card, struct snd_hal2 **rchip) struct hpc3_regs *hpc3 = hpc3c0; int err; - hal2 = kzalloc_obj(*hal2, GFP_KERNEL); + hal2 = kzalloc_obj(*hal2); if (!hal2) return -ENOMEM; diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index af2690d901b4..497d84cff12f 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c @@ -788,7 +788,7 @@ static int snd_sgio2audio_create(struct snd_card *card, if (!(readq(&mace->perif.audio.control) & AUDIO_CONTROL_CODEC_PRESENT)) return -ENOENT; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return -ENOMEM; diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c index e9f30201cf4b..fb40476c6c91 100644 --- a/sound/parisc/harmony.c +++ b/sound/parisc/harmony.c @@ -852,7 +852,7 @@ snd_harmony_create(struct snd_card *card, *rchip = NULL; - h = kzalloc_obj(*h, GFP_KERNEL); + h = kzalloc_obj(*h); if (h == NULL) return -ENOMEM; diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 7392bc15affa..0bb65be021d9 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -1957,7 +1957,7 @@ int snd_ac97_bus(struct snd_card *card, int num, if (snd_BUG_ON(!card)) return -EINVAL; - bus = kzalloc_obj(*bus, GFP_KERNEL); + bus = kzalloc_obj(*bus); if (bus == NULL) return -ENOMEM; bus->card = card; @@ -2069,7 +2069,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, return -EBUSY; card = bus->card; - ac97 = kzalloc_obj(*ac97, GFP_KERNEL); + ac97 = kzalloc_obj(*ac97); if (ac97 == NULL) return -ENOMEM; ac97->private_data = template->private_data; diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c index 9df21c42d624..cbfbabb02818 100644 --- a/sound/pci/ac97/ac97_pcm.c +++ b/sound/pci/ac97/ac97_pcm.c @@ -441,7 +441,7 @@ int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, unsigned int rates; struct snd_ac97 *codec; - rpcms = kzalloc_objs(struct ac97_pcm, pcms_count, GFP_KERNEL); + rpcms = kzalloc_objs(struct ac97_pcm, pcms_count); if (rpcms == NULL) return -ENOMEM; memset(avail_slots, 0, sizeof(avail_slots)); diff --git a/sound/pci/ak4531_codec.c b/sound/pci/ak4531_codec.c index c7f32b1de462..6f35b616efc6 100644 --- a/sound/pci/ak4531_codec.c +++ b/sound/pci/ak4531_codec.c @@ -373,7 +373,7 @@ int snd_ak4531_mixer(struct snd_card *card, return -EINVAL; if (rak4531) *rak4531 = NULL; - ak4531 = kzalloc_obj(*ak4531, GFP_KERNEL); + ak4531 = kzalloc_obj(*ak4531); if (ak4531 == NULL) return -ENOMEM; *ak4531 = *_ak4531; diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 5b82777522d8..a73893a2cbd6 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -342,7 +342,7 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream) { struct snd_als300 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_als300_substream_data *data = kzalloc_obj(*data, GFP_KERNEL); + struct snd_als300_substream_data *data = kzalloc_obj(*data); if (!data) return -ENOMEM; @@ -369,7 +369,7 @@ static int snd_als300_capture_open(struct snd_pcm_substream *substream) { struct snd_als300 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_als300_substream_data *data = kzalloc_obj(*data, GFP_KERNEL); + struct snd_als300_substream_data *data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index c5f38fc88c86..3a64d0562803 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c @@ -975,7 +975,7 @@ static int snd_card_asihpi_playback_open(struct snd_pcm_substream *substream) struct snd_pcm_hardware snd_card_asihpi_playback; int err; - dpcm = kzalloc_obj(*dpcm, GFP_KERNEL); + dpcm = kzalloc_obj(*dpcm); if (dpcm == NULL) return -ENOMEM; @@ -1145,7 +1145,7 @@ static int snd_card_asihpi_capture_open(struct snd_pcm_substream *substream) struct snd_pcm_hardware snd_card_asihpi_capture; int err; - dpcm = kzalloc_obj(*dpcm, GFP_KERNEL); + dpcm = kzalloc_obj(*dpcm); if (dpcm == NULL) return -ENOMEM; diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c index 41b2892a9312..c8d1518ee3e7 100644 --- a/sound/pci/asihpi/hpi6000.c +++ b/sound/pci/asihpi/hpi6000.c @@ -406,7 +406,7 @@ static void subsys_create_adapter(struct hpi_message *phm, memset(&ao, 0, sizeof(ao)); - ao.priv = kzalloc_obj(struct hpi_hw_obj, GFP_KERNEL); + ao.priv = kzalloc_obj(struct hpi_hw_obj); if (!ao.priv) { HPI_DEBUG_LOG(ERROR, "can't get mem for adapter object\n"); phr->error = HPI_ERROR_MEMORY_ALLOC; diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index c484d929d6da..98e7f7fa75c3 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c @@ -461,7 +461,7 @@ static void subsys_create_adapter(struct hpi_message *phm, memset(&ao, 0, sizeof(ao)); - ao.priv = kzalloc_obj(struct hpi_hw_obj, GFP_KERNEL); + ao.priv = kzalloc_obj(struct hpi_hw_obj); if (!ao.priv) { HPI_DEBUG_LOG(ERROR, "can't get mem for adapter object\n"); phr->error = HPI_ERROR_MEMORY_ALLOC; diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c index 2378bdeb1f23..d846777e7462 100644 --- a/sound/pci/asihpi/hpicmn.c +++ b/sound/pci/asihpi/hpicmn.c @@ -641,12 +641,12 @@ void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *p_cache, struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count, const u32 size_in_bytes, u8 *p_dsp_control_buffer) { - struct hpi_control_cache *p_cache = kmalloc_obj(*p_cache, GFP_KERNEL); + struct hpi_control_cache *p_cache = kmalloc_obj(*p_cache); if (!p_cache) return NULL; p_cache->p_info = - kzalloc_objs(*p_cache->p_info, control_count, GFP_KERNEL); + kzalloc_objs(*p_cache->p_info, control_count); if (!p_cache->p_info) { kfree(p_cache); return NULL; diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c index 8eda87107b28..b1b5a131f626 100644 --- a/sound/pci/asihpi/hpidspcd.c +++ b/sound/pci/asihpi/hpidspcd.c @@ -69,7 +69,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code, } HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); - dsp_code->pvt = kmalloc_obj(*dsp_code->pvt, GFP_KERNEL); + dsp_code->pvt = kmalloc_obj(*dsp_code->pvt); if (!dsp_code->pvt) { err_ret = HPI_ERROR_MEMORY_ALLOC; goto error2; diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 24c116ab9cf5..9de9ae7032b8 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c @@ -105,8 +105,8 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (cmd != HPI_IOCTL_LINUX) return -EINVAL; - hm = kmalloc_obj(*hm, GFP_KERNEL); - hr = kzalloc_obj(*hr, GFP_KERNEL); + hm = kmalloc_obj(*hm); + hr = kzalloc_obj(*hr); if (!hm || !hr) { err = -ENOMEM; goto out; diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index bdf9453939f3..35392f6525b3 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -543,7 +543,7 @@ static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substr struct snd_pcm_runtime *runtime = substream->runtime; int err; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; @@ -638,7 +638,7 @@ static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substre struct snd_pcm_runtime *runtime = substream->runtime; int err; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (!epcm) return -ENOMEM; diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 189948f70d84..cd73b6833639 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -1096,7 +1096,7 @@ static int save_mixer_state(struct cmipci *cm) struct snd_ctl_elem_value *val; unsigned int i; - val = kmalloc_obj(*val, GFP_KERNEL); + val = kmalloc_obj(*val); if (!val) return -ENOMEM; for (i = 0; i < CM_SAVED_MIXERS; i++) { @@ -1130,7 +1130,7 @@ static void restore_mixer_state(struct cmipci *cm) struct snd_ctl_elem_value *val; unsigned int i; - val = kmalloc_obj(*val, GFP_KERNEL); + val = kmalloc_obj(*val); if (!val) return; cm->mixer_insensitive = 0; /* at first clear this; diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index d7bed722d939..1c11023184ac 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -401,7 +401,7 @@ static int load_firmware(struct snd_cs46xx *chip, } err = -ENOMEM; - module = kzalloc_obj(*module, GFP_KERNEL); + module = kzalloc_obj(*module); if (!module) goto error; module->module_name = kstrdup(fw_name, GFP_KERNEL); @@ -414,7 +414,7 @@ static int load_firmware(struct snd_cs46xx *chip, if (nums >= 40) goto error_inval; module->symbol_table.symbols = - kzalloc_objs(struct dsp_symbol_entry, nums, GFP_KERNEL); + kzalloc_objs(struct dsp_symbol_entry, nums); if (!module->symbol_table.symbols) goto error; for (i = 0; i < nums; i++) { @@ -434,7 +434,7 @@ static int load_firmware(struct snd_cs46xx *chip, if (nums > 10) goto error_inval; module->segments = - kzalloc_objs(struct dsp_segment_desc, nums, GFP_KERNEL); + kzalloc_objs(struct dsp_segment_desc, nums); if (!module->segments) goto error; for (i = 0; i < nums; i++) { diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index c55ff043d1d7..fd19365026b4 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c @@ -234,7 +234,7 @@ void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip, entry = snd_info_create_card_entry(ins->snd_card, scb->scb_name, ins->proc_dsp_dir); if (entry) { - scb_info = kmalloc_obj(struct proc_scb_info, GFP_KERNEL); + scb_info = kmalloc_obj(struct proc_scb_info); if (!scb_info) { snd_info_free_entry(entry); entry = NULL; diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c index c22e3173ec1b..5fc1c922620a 100644 --- a/sound/pci/ctxfi/ctamixer.c +++ b/sound/pci/ctxfi/ctamixer.c @@ -296,7 +296,7 @@ int amixer_mgr_create(struct hw *hw, void **ramixer_mgr) struct amixer_mgr *amixer_mgr; *ramixer_mgr = NULL; - amixer_mgr = kzalloc_obj(*amixer_mgr, GFP_KERNEL); + amixer_mgr = kzalloc_obj(*amixer_mgr); if (!amixer_mgr) return -ENOMEM; @@ -448,7 +448,7 @@ int sum_mgr_create(struct hw *hw, void **rsum_mgr) struct sum_mgr *sum_mgr; *rsum_mgr = NULL; - sum_mgr = kzalloc_obj(*sum_mgr, GFP_KERNEL); + sum_mgr = kzalloc_obj(*sum_mgr); if (!sum_mgr) return -ENOMEM; diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index f130a2722a70..f122e396bc55 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -1723,7 +1723,7 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci, *ratc = NULL; - atc = kzalloc_obj(*atc, GFP_KERNEL); + atc = kzalloc_obj(*atc); if (!atc) return -ENOMEM; diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c index 12653f7cd9e8..b8bde27f3a1d 100644 --- a/sound/pci/ctxfi/ctdaio.c +++ b/sound/pci/ctxfi/ctdaio.c @@ -159,7 +159,7 @@ static int dao_set_left_input(struct dao *dao, struct rsc *input) struct daio *daio = &dao->daio; int i; - entry = kzalloc_objs(*entry, daio->rscl.msr, GFP_KERNEL); + entry = kzalloc_objs(*entry, daio->rscl.msr); if (!entry) return -ENOMEM; @@ -188,7 +188,7 @@ static int dao_set_right_input(struct dao *dao, struct rsc *input) struct daio *daio = &dao->daio; int i; - entry = kzalloc_objs(*entry, daio->rscr.msr, GFP_KERNEL); + entry = kzalloc_objs(*entry, daio->rscr.msr); if (!entry) return -ENOMEM; @@ -660,7 +660,7 @@ int daio_mgr_create(struct hw *hw, void **rdaio_mgr) struct imapper *entry; *rdaio_mgr = NULL; - daio_mgr = kzalloc_obj(*daio_mgr, GFP_KERNEL); + daio_mgr = kzalloc_obj(*daio_mgr); if (!daio_mgr) return -ENOMEM; @@ -671,7 +671,7 @@ int daio_mgr_create(struct hw *hw, void **rdaio_mgr) spin_lock_init(&daio_mgr->mgr_lock); spin_lock_init(&daio_mgr->imap_lock); INIT_LIST_HEAD(&daio_mgr->imappers); - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) { err = -ENOMEM; goto error2; diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index 0851453b8565..06753f555944 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c @@ -157,7 +157,7 @@ static int src_get_rsc_ctrl_blk(void **rblk) struct src_rsc_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -483,7 +483,7 @@ static int src_mgr_get_ctrl_blk(void **rblk) struct src_mgr_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -504,7 +504,7 @@ static int srcimp_mgr_get_ctrl_blk(void **rblk) struct srcimp_mgr_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -691,7 +691,7 @@ static int amixer_rsc_get_ctrl_blk(void **rblk) struct amixer_rsc_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -898,7 +898,7 @@ static int dai_get_ctrl_blk(void **rblk) struct dai_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -947,7 +947,7 @@ static int dao_get_ctrl_blk(void **rblk) struct dao_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -1141,7 +1141,7 @@ static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk) struct daio_mgr_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -2227,7 +2227,7 @@ int create_20k1_hw_obj(struct hw **rhw) struct hw20k1 *hw20k1; *rhw = NULL; - hw20k1 = kzalloc_obj(*hw20k1, GFP_KERNEL); + hw20k1 = kzalloc_obj(*hw20k1); if (!hw20k1) return -ENOMEM; diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 1d558914a26a..07e1490a6d17 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c @@ -157,7 +157,7 @@ static int src_get_rsc_ctrl_blk(void **rblk) struct src_rsc_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -483,7 +483,7 @@ static int src_mgr_get_ctrl_blk(void **rblk) struct src_mgr_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -504,7 +504,7 @@ static int srcimp_mgr_get_ctrl_blk(void **rblk) struct srcimp_mgr_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -693,7 +693,7 @@ static int amixer_rsc_get_ctrl_blk(void **rblk) struct amixer_rsc_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -882,7 +882,7 @@ static int dai_get_ctrl_blk(void **rblk) struct dai_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -932,7 +932,7 @@ static int dao_get_ctrl_blk(void **rblk) struct dao_ctrl_blk *blk; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -1084,7 +1084,7 @@ static int daio_mgr_get_ctrl_blk(struct hw *hw, void **rblk) int i; *rblk = NULL; - blk = kzalloc_obj(*blk, GFP_KERNEL); + blk = kzalloc_obj(*blk); if (!blk) return -ENOMEM; @@ -2369,7 +2369,7 @@ int create_20k2_hw_obj(struct hw **rhw) struct hw20k2 *hw20k2; *rhw = NULL; - hw20k2 = kzalloc_obj(*hw20k2, GFP_KERNEL); + hw20k2 = kzalloc_obj(*hw20k2); if (!hw20k2) return -ENOMEM; diff --git a/sound/pci/ctxfi/ctmixer.c b/sound/pci/ctxfi/ctmixer.c index 3c5b89f3eae3..e3ee76bd8482 100644 --- a/sound/pci/ctxfi/ctmixer.c +++ b/sound/pci/ctxfi/ctmixer.c @@ -969,7 +969,7 @@ static int ct_mixer_get_mem(struct ct_mixer **rmixer) *rmixer = NULL; /* Allocate mem for mixer obj */ - mixer = kzalloc_obj(*mixer, GFP_KERNEL); + mixer = kzalloc_obj(*mixer); if (!mixer) return -ENOMEM; diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index 2b0f4130642c..fea6024f920e 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c @@ -119,7 +119,7 @@ static int ct_pcm_playback_open(struct snd_pcm_substream *substream) struct ct_atc_pcm *apcm; int err; - apcm = kzalloc_obj(*apcm, GFP_KERNEL); + apcm = kzalloc_obj(*apcm); if (!apcm) return -ENOMEM; @@ -265,7 +265,7 @@ static int ct_pcm_capture_open(struct snd_pcm_substream *substream) struct ct_atc_pcm *apcm; int err; - apcm = kzalloc_obj(*apcm, GFP_KERNEL); + apcm = kzalloc_obj(*apcm); if (!apcm) return -ENOMEM; diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c index b781201c7f0e..326997bb885d 100644 --- a/sound/pci/ctxfi/ctsrc.c +++ b/sound/pci/ctxfi/ctsrc.c @@ -540,7 +540,7 @@ int src_mgr_create(struct hw *hw, void **rsrc_mgr) struct src_mgr *src_mgr; *rsrc_mgr = NULL; - src_mgr = kzalloc_obj(*src_mgr, GFP_KERNEL); + src_mgr = kzalloc_obj(*src_mgr); if (!src_mgr) return -ENOMEM; @@ -669,7 +669,7 @@ static int srcimp_rsc_init(struct srcimp *srcimp, return err; /* Reserve memory for imapper nodes */ - srcimp->imappers = kzalloc_objs(struct imapper, desc->msr, GFP_KERNEL); + srcimp->imappers = kzalloc_objs(struct imapper, desc->msr); if (!srcimp->imappers) { err = -ENOMEM; goto error1; @@ -810,7 +810,7 @@ int srcimp_mgr_create(struct hw *hw, void **rsrcimp_mgr) struct imapper *entry; *rsrcimp_mgr = NULL; - srcimp_mgr = kzalloc_obj(*srcimp_mgr, GFP_KERNEL); + srcimp_mgr = kzalloc_obj(*srcimp_mgr); if (!srcimp_mgr) return -ENOMEM; @@ -821,7 +821,7 @@ int srcimp_mgr_create(struct hw *hw, void **rsrcimp_mgr) spin_lock_init(&srcimp_mgr->mgr_lock); spin_lock_init(&srcimp_mgr->imap_lock); INIT_LIST_HEAD(&srcimp_mgr->imappers); - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) { err = -ENOMEM; goto error2; diff --git a/sound/pci/ctxfi/cttimer.c b/sound/pci/ctxfi/cttimer.c index 53d16f575c38..cc379d880cad 100644 --- a/sound/pci/ctxfi/cttimer.c +++ b/sound/pci/ctxfi/cttimer.c @@ -390,7 +390,7 @@ struct ct_timer *ct_timer_new(struct ct_atc *atc) struct ct_timer *atimer; struct hw *hw; - atimer = kzalloc_obj(*atimer, GFP_KERNEL); + atimer = kzalloc_obj(*atimer); if (!atimer) return NULL; spin_lock_init(&atimer->lock); diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c index 316072863dbf..25e071cae08b 100644 --- a/sound/pci/ctxfi/ctvmem.c +++ b/sound/pci/ctxfi/ctvmem.c @@ -55,7 +55,7 @@ get_vm_block(struct ct_vm *vm, unsigned int size, struct ct_atc *atc) return entry; } - block = kzalloc_obj(*block, GFP_KERNEL); + block = kzalloc_obj(*block); if (!block) return NULL; @@ -170,7 +170,7 @@ int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci) *rvm = NULL; - vm = kzalloc_obj(*vm, GFP_KERNEL); + vm = kzalloc_obj(*vm); if (!vm) return -ENOMEM; @@ -195,7 +195,7 @@ int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci) vm->get_ptp_phys = ct_get_ptp_phys; INIT_LIST_HEAD(&vm->unused); INIT_LIST_HEAD(&vm->used); - block = kzalloc_obj(*block, GFP_KERNEL); + block = kzalloc_obj(*block); if (NULL != block) { block->addr = 0; block->size = vm->size; diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index fdf309633c8a..214d68657707 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -265,7 +265,7 @@ static int pcm_open(struct snd_pcm_substream *substream, chip = snd_pcm_substream_chip(substream); runtime = substream->runtime; - pipe = kzalloc_obj(struct audiopipe, GFP_KERNEL); + pipe = kzalloc_obj(struct audiopipe); if (!pipe) return -ENOMEM; pipe->index = -1; /* Not configured yet */ diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index e79f773941cd..1b207ca25814 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -367,7 +367,7 @@ static int snd_emu10k1x_playback_open(struct snd_pcm_substream *substream) if (err < 0) return err; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; epcm->emu = chip; @@ -547,7 +547,7 @@ static int snd_emu10k1x_pcm_open_capture(struct snd_pcm_substream *substream) if (err < 0) return err; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index a9c786fe638a..080c5fedc850 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -776,7 +776,7 @@ static int snd_emu10k1_verify_controls(struct snd_emu10k1 *emu, if (snd_emu10k1_look_for_ctl(emu, &id) == NULL) return -ENOENT; } - gctl = kmalloc_obj(*gctl, GFP_KERNEL); + gctl = kmalloc_obj(*gctl); if (! gctl) return -ENOMEM; err = 0; @@ -864,9 +864,9 @@ static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu, struct snd_ctl_elem_value *val; int err = 0; - val = kmalloc_obj(*val, GFP_KERNEL); - gctl = kmalloc_obj(*gctl, GFP_KERNEL); - nctl = kmalloc_obj(*nctl, GFP_KERNEL); + val = kmalloc_obj(*val); + gctl = kmalloc_obj(*gctl); + nctl = kmalloc_obj(*nctl); if (!val || !gctl || !nctl) { err = -ENOMEM; goto __error; @@ -914,7 +914,7 @@ static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu, nctl->max = gctl->max; nctl->translation = gctl->translation; if (ctl == NULL) { - ctl = kmalloc_obj(*ctl, GFP_KERNEL); + ctl = kmalloc_obj(*ctl); if (ctl == NULL) { err = -ENOMEM; kfree(knew.tlv.p); @@ -980,7 +980,7 @@ static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_ctl *ctl; struct snd_ctl_elem_id *id; - gctl = kmalloc_obj(*gctl, GFP_KERNEL); + gctl = kmalloc_obj(*gctl); if (! gctl) return -ENOMEM; @@ -1282,7 +1282,7 @@ static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu) u32 *gpr_map; err = -ENOMEM; - icode = kzalloc_obj(*icode, GFP_KERNEL); + icode = kzalloc_obj(*icode); if (!icode) return err; @@ -1290,7 +1290,7 @@ static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu) GFP_KERNEL); if (!icode->gpr_map) goto __err_gpr; - controls = kzalloc_objs(*controls, SND_EMU10K1_GPR_CONTROLS, GFP_KERNEL); + controls = kzalloc_objs(*controls, SND_EMU10K1_GPR_CONTROLS); if (!controls) goto __err_ctrls; @@ -1799,7 +1799,7 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) u32 *gpr_map; err = -ENOMEM; - icode = kzalloc_obj(*icode, GFP_KERNEL); + icode = kzalloc_obj(*icode); if (!icode) return err; @@ -1813,7 +1813,7 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) if (!controls) goto __err_ctrls; - ipcm = kzalloc_obj(*ipcm, GFP_KERNEL); + ipcm = kzalloc_obj(*ipcm); if (!ipcm) goto __err_ipcm; diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 1a0fd2014691..9023f3444d20 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -1132,7 +1132,7 @@ static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; int i, j, err; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -1171,7 +1171,7 @@ static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; int i, err, sample_rate; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -1222,7 +1222,7 @@ static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct snd_emu10k1_pcm *epcm; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -1259,7 +1259,7 @@ static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream) struct snd_emu10k1_pcm *epcm; struct snd_pcm_runtime *runtime = substream->runtime; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; @@ -1299,7 +1299,7 @@ static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream) int nefx = emu->audigy ? 64 : 32; int idx, err; - epcm = kzalloc_obj(*epcm, GFP_KERNEL); + epcm = kzalloc_obj(*epcm); if (epcm == NULL) return -ENOMEM; epcm->emu = emu; diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 6650f0192281..b7282b3fa1b1 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -1307,7 +1307,7 @@ static struct esm_memory *snd_es1968_new_memory(struct es1968 *chip, int size) __found: if (buf->buf.bytes > size) { - struct esm_memory *chunk = kmalloc_obj(*chunk, GFP_KERNEL); + struct esm_memory *chunk = kmalloc_obj(*chunk); if (chunk == NULL) return NULL; chunk->buf = buf->buf; @@ -1385,7 +1385,7 @@ snd_es1968_init_dmabuf(struct es1968 *chip) INIT_LIST_HEAD(&chip->buf_list); /* allocate an empty chunk */ - chunk = kmalloc_obj(*chunk, GFP_KERNEL); + chunk = kmalloc_obj(*chunk); if (chunk == NULL) { snd_es1968_free_dmabuf(chip); return -ENOMEM; @@ -1488,7 +1488,7 @@ static int snd_es1968_playback_open(struct snd_pcm_substream *substream) if (apu1 < 0) return apu1; - es = kzalloc_obj(*es, GFP_KERNEL); + es = kzalloc_obj(*es); if (!es) { snd_es1968_free_apu_pair(chip, apu1); return -ENOMEM; @@ -1529,7 +1529,7 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream) return apu2; } - es = kzalloc_obj(*es, GFP_KERNEL); + es = kzalloc_obj(*es); if (!es) { snd_es1968_free_apu_pair(chip, apu1); snd_es1968_free_apu_pair(chip, apu2); diff --git a/sound/pci/ice1712/ak4xxx.c b/sound/pci/ice1712/ak4xxx.c index e82bfc02599e..bcafa16ce547 100644 --- a/sound/pci/ice1712/ak4xxx.c +++ b/sound/pci/ice1712/ak4xxx.c @@ -115,7 +115,7 @@ int snd_ice1712_akm4xxx_init(struct snd_akm4xxx *ak, const struct snd_akm4xxx *t struct snd_ak4xxx_private *priv; if (_priv != NULL) { - priv = kmalloc_obj(*priv, GFP_KERNEL); + priv = kmalloc_obj(*priv); if (priv == NULL) return -ENOMEM; *priv = *_priv; diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 92c4950137b0..1191a2686dfd 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c @@ -2076,7 +2076,7 @@ static int aureon_init(struct snd_ice1712 *ice) struct aureon_spec *spec; int i, err; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -2091,7 +2091,7 @@ static int aureon_init(struct snd_ice1712 *ice) } /* to remember the register values of CS8415 */ - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); if (!ice->akm) return -ENOMEM; ice->akm_codecs = 1; diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index 5ea80bd596e6..897b749c70b5 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c @@ -707,7 +707,7 @@ static int snd_ice1712_delta_init(struct snd_ice1712 *ice) } /* second stage of initialization, analog parts and others */ - ak = ice->akm = kmalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ak = ice->akm = kmalloc_obj(struct snd_akm4xxx); if (! ak) return -ENOMEM; ice->akm_codecs = 1; diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index 43a0a569de1b..26f5d5528e27 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c @@ -431,7 +431,7 @@ static int snd_ice1712_ews_init(struct snd_ice1712 *ice) break; } - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -530,7 +530,7 @@ static int snd_ice1712_ews_init(struct snd_ice1712 *ice) } /* analog section */ - ak = ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ak = ice->akm = kzalloc_obj(struct snd_akm4xxx); if (! ak) return -ENOMEM; ice->akm_codecs = 1; diff --git a/sound/pci/ice1712/hoontech.c b/sound/pci/ice1712/hoontech.c index ab651526aba9..5294c9dd782d 100644 --- a/sound/pci/ice1712/hoontech.c +++ b/sound/pci/ice1712/hoontech.c @@ -156,7 +156,7 @@ static int hoontech_init(struct snd_ice1712 *ice, bool staudio) ice->num_total_dacs = 8; ice->num_total_adcs = 8; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -301,7 +301,7 @@ static int snd_ice1712_value_init(struct snd_ice1712 *ice) ice->num_total_adcs = 2; /* analog section */ - ak = ice->akm = kmalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ak = ice->akm = kmalloc_obj(struct snd_akm4xxx); if (! ak) return -ENOMEM; ice->akm_codecs = 1; diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c index 10f0eb7b347d..ab1c8ac07160 100644 --- a/sound/pci/ice1712/juli.c +++ b/sound/pci/ice1712/juli.c @@ -560,7 +560,7 @@ static int juli_init(struct snd_ice1712 *ice) struct juli_spec *spec; struct snd_akm4xxx *ak; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -594,7 +594,7 @@ static int juli_init(struct snd_ice1712 *ice) ice->num_total_dacs = 2; ice->num_total_adcs = 2; - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); ak = ice->akm; if (!ak) return -ENOMEM; diff --git a/sound/pci/ice1712/maya44.c b/sound/pci/ice1712/maya44.c index b854fec347c4..fd1427d64a7b 100644 --- a/sound/pci/ice1712/maya44.c +++ b/sound/pci/ice1712/maya44.c @@ -668,7 +668,7 @@ static int maya44_init(struct snd_ice1712 *ice) int i; struct snd_maya44 *chip; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (!chip) return -ENOMEM; mutex_init(&chip->mutex); diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c index 00f97b87b06c..37756d06218d 100644 --- a/sound/pci/ice1712/phase.c +++ b/sound/pci/ice1712/phase.c @@ -125,7 +125,7 @@ static int phase22_init(struct snd_ice1712 *ice) } /* Initialize analog chips */ - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); ak = ice->akm; if (!ak) return -ENOMEM; @@ -411,13 +411,13 @@ static int phase28_init(struct snd_ice1712 *ice) ice->num_total_dacs = 8; ice->num_total_adcs = 2; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; /* Initialize analog chips */ - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); ak = ice->akm; if (!ak) return -ENOMEM; diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c index 80f7bb3af420..b2bd64ece862 100644 --- a/sound/pci/ice1712/pontis.c +++ b/sound/pci/ice1712/pontis.c @@ -728,7 +728,7 @@ static int pontis_init(struct snd_ice1712 *ice) ice->num_total_adcs = 2; /* to remember the register values */ - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); if (! ice->akm) return -ENOMEM; ice->akm_codecs = 1; diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c index 039ead80dd64..6c4783b9a983 100644 --- a/sound/pci/ice1712/prodigy192.c +++ b/sound/pci/ice1712/prodigy192.c @@ -713,7 +713,7 @@ static int prodigy192_init(struct snd_ice1712 *ice) ice->num_total_adcs = 2; ice->vt1720 = 0; /* ice1724, e.g. 23 GPIOs */ - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index 105409daf071..bb5169a69b18 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c @@ -1060,12 +1060,12 @@ static int prodigy_hifi_init(struct snd_ice1712 *ice) ice->gpio.saved[0] = 0; /* to remember the register values */ - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); if (! ice->akm) return -ENOMEM; ice->akm_codecs = 1; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -1143,12 +1143,12 @@ static int prodigy_hd2_init(struct snd_ice1712 *ice) ice->gpio.saved[0] = 0; /* to remember the register values */ - ice->akm = kzalloc_obj(struct snd_akm4xxx, GFP_KERNEL); + ice->akm = kzalloc_obj(struct snd_akm4xxx); if (! ice->akm) return -ENOMEM; ice->akm_codecs = 1; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; diff --git a/sound/pci/ice1712/psc724.c b/sound/pci/ice1712/psc724.c index bb69d5173983..7842bf98af19 100644 --- a/sound/pci/ice1712/psc724.c +++ b/sound/pci/ice1712/psc724.c @@ -383,7 +383,7 @@ static int psc724_init(struct snd_ice1712 *ice) { struct psc724_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c index a4f13a3ed6cf..6a44ae969d15 100644 --- a/sound/pci/ice1712/quartet.c +++ b/sound/pci/ice1712/quartet.c @@ -969,7 +969,7 @@ static int qtet_init(struct snd_ice1712 *ice) val = inb(ICEMT1724(ice, RATE)); outb(val | VT1724_SPDIF_MASTER, ICEMT1724(ice, RATE)); - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; /* qtet is clocked by Xilinx array */ @@ -1005,7 +1005,7 @@ static int qtet_init(struct snd_ice1712 *ice) ice->num_total_dacs = 2; ice->num_total_adcs = 2; - ice->akm = kzalloc_objs(struct snd_akm4xxx, 2, GFP_KERNEL); + ice->akm = kzalloc_objs(struct snd_akm4xxx, 2); ak = ice->akm; if (!ak) return -ENOMEM; diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 37556ff6fb36..d9723c297d40 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c @@ -147,7 +147,7 @@ static int revo51_i2c_init(struct snd_ice1712 *ice, struct revo51_spec *spec; int err; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -470,7 +470,7 @@ static int ap192_ak4114_init(struct snd_ice1712 *ice) int err; struct revo51_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; @@ -515,7 +515,7 @@ static int revo_init(struct snd_ice1712 *ice) } /* second stage of initialization, analog parts and others */ - ak = ice->akm = kzalloc_objs(struct snd_akm4xxx, 2, GFP_KERNEL); + ak = ice->akm = kzalloc_objs(struct snd_akm4xxx, 2); if (! ak) return -ENOMEM; switch (ice->eeprom.subvendor) { diff --git a/sound/pci/ice1712/se.c b/sound/pci/ice1712/se.c index 09f5085d2dde..d78328288fc6 100644 --- a/sound/pci/ice1712/se.c +++ b/sound/pci/ice1712/se.c @@ -660,7 +660,7 @@ static int se_init(struct snd_ice1712 *ice) { struct se_spec *spec; - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; diff --git a/sound/pci/ice1712/wtm.c b/sound/pci/ice1712/wtm.c index 0c961b588cd2..c38f1bd1948d 100644 --- a/sound/pci/ice1712/wtm.c +++ b/sound/pci/ice1712/wtm.c @@ -579,7 +579,7 @@ static int wtm_init(struct snd_ice1712 *ice) ice->force_rdma1 = 1; /*init mutex for dac mute conflict*/ - spec = kzalloc_obj(*spec, GFP_KERNEL); + spec = kzalloc_obj(*spec); if (!spec) return -ENOMEM; ice->spec = spec; diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index bcf36b102f6f..a7760a23bfe9 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -255,7 +255,7 @@ snd_mixart_add_ref_pipe(struct snd_mixart *chip, int pcm_number, int capture, "add_ref_pipe audio chip(%d) pcm(%d)\n", chip->chip_idx, pcm_number); - buf = kmalloc_obj(*buf, GFP_KERNEL); + buf = kmalloc_obj(*buf); if (!buf) return NULL; @@ -1017,7 +1017,7 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int .dev_free = snd_mixart_chip_dev_free, }; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (!chip) return -ENOMEM; @@ -1243,7 +1243,7 @@ static int snd_mixart_probe(struct pci_dev *pci, /* */ - mgr = kzalloc_obj(*mgr, GFP_KERNEL); + mgr = kzalloc_obj(*mgr); if (! mgr) { pci_disable_device(pci); return -ENOMEM; diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c index 9b19c83a26c5..439e3ff05fe1 100644 --- a/sound/pci/mixart/mixart_hwdep.c +++ b/sound/pci/mixart/mixart_hwdep.c @@ -135,9 +135,9 @@ static int mixart_enum_connectors(struct mixart_mgr *mgr) struct mixart_audio_info_req *audio_info_req; struct mixart_audio_info_resp *audio_info; - connector = kmalloc_obj(*connector, GFP_KERNEL); - audio_info_req = kmalloc_obj(*audio_info_req, GFP_KERNEL); - audio_info = kmalloc_obj(*audio_info, GFP_KERNEL); + connector = kmalloc_obj(*connector); + audio_info_req = kmalloc_obj(*audio_info_req); + audio_info = kmalloc_obj(*audio_info); if (! connector || ! audio_info_req || ! audio_info) { err = -ENOMEM; goto __error; diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 66e71bdfbc77..e7d63972c2ca 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -1163,7 +1163,7 @@ static int pcxhr_create(struct pcxhr_mgr *mgr, .dev_free = pcxhr_chip_dev_free, }; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (!chip) return -ENOMEM; @@ -1488,7 +1488,7 @@ static int pcxhr_probe(struct pci_dev *pci, } /* alloc card manager */ - mgr = kzalloc_obj(*mgr, GFP_KERNEL); + mgr = kzalloc_obj(*mgr); if (! mgr) { pci_disable_device(pci); return -ENOMEM; diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 8217a42c5bb7..99c00e46ce23 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c @@ -1595,7 +1595,7 @@ static int snd_riptide_playback_open(struct snd_pcm_substream *substream) chip->playback_substream[sub_num] = substream; runtime->hw = snd_riptide_playback; - data = kzalloc_obj(struct pcmhw, GFP_KERNEL); + data = kzalloc_obj(struct pcmhw); if (data == NULL) return -ENOMEM; data->paths = lbus_play_paths[sub_num]; @@ -1618,7 +1618,7 @@ static int snd_riptide_capture_open(struct snd_pcm_substream *substream) chip->capture_substream = substream; runtime->hw = snd_riptide_capture; - data = kzalloc_obj(struct pcmhw, GFP_KERNEL); + data = kzalloc_obj(struct pcmhw); if (data == NULL) return -ENOMEM; data->paths = lbus_rec_path; @@ -1768,7 +1768,7 @@ static int snd_riptide_initialize(struct snd_riptide *chip) cif = chip->cif; if (!cif) { - cif = kzalloc_obj(struct cmdif, GFP_KERNEL); + cif = kzalloc_obj(struct cmdif); if (!cif) return -ENOMEM; cif->dev = chip->card->dev; diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 2978036aa8c5..d8bbedbc8ff6 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6671,7 +6671,7 @@ static int snd_hdspm_create(struct snd_card *card, if (hdspm_read(hdspm, HDSPM_statusRegister2) & HDSPM_s2_tco_detect) { hdspm->midiPorts++; - hdspm->tco = kzalloc_obj(*hdspm->tco, GFP_KERNEL); + hdspm->tco = kzalloc_obj(*hdspm->tco); if (hdspm->tco) hdspm_tco_write(hdspm); @@ -6685,7 +6685,7 @@ static int snd_hdspm_create(struct snd_card *card, case AES32: if (hdspm_read(hdspm, HDSPM_statusRegister) & HDSPM_tco_detect) { hdspm->midiPorts++; - hdspm->tco = kzalloc_obj(*hdspm->tco, GFP_KERNEL); + hdspm->tco = kzalloc_obj(*hdspm->tco); if (hdspm->tco) hdspm_tco_write(hdspm); diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index b0f1433e530f..fa8d7f271eaf 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -2888,7 +2888,7 @@ static int snd_trident_mixer(struct snd_trident *trident, int pcm_spdif_device) .read = snd_trident_codec_read, }; - uctl = kzalloc_obj(*uctl, GFP_KERNEL); + uctl = kzalloc_obj(*uctl); if (!uctl) return -ENOMEM; diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index dc6f603160ac..b9a09568afc9 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -864,7 +864,7 @@ static int snd_ymfpci_playback_open_1(struct snd_pcm_substream *substream) if (err < 0) return err; - ypcm = kzalloc_obj(*ypcm, GFP_KERNEL); + ypcm = kzalloc_obj(*ypcm); if (ypcm == NULL) return -ENOMEM; ypcm->chip = chip; @@ -990,7 +990,7 @@ static int snd_ymfpci_capture_open(struct snd_pcm_substream *substream, if (err < 0) return err; - ypcm = kzalloc_obj(*ypcm, GFP_KERNEL); + ypcm = kzalloc_obj(*ypcm); if (ypcm == NULL) return -ENOMEM; ypcm->chip = chip; diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c index c0ae099963c8..f6fdebcff716 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c @@ -142,7 +142,7 @@ struct snd_pdacf *snd_pdacf_create(struct snd_card *card) { struct snd_pdacf *chip; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return NULL; chip->card = card; diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c index 5d5fccb71d70..ee36ea2842cd 100644 --- a/sound/ppc/awacs.c +++ b/sound/ppc/awacs.c @@ -896,7 +896,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip) chip->revision = (in_le32(&chip->awacs->codec_stat) >> 12) & 0xf; #ifdef PMAC_AMP_AVAIL if (chip->revision == 3 && chip->has_iic && CHECK_CUDA_AMP()) { - struct awacs_amp *amp = kzalloc_obj(*amp, GFP_KERNEL); + struct awacs_amp *amp = kzalloc_obj(*amp); if (! amp) return -ENOMEM; chip->mixer_data = amp; diff --git a/sound/ppc/beep.c b/sound/ppc/beep.c index 5e5370e83d56..1b03a7961727 100644 --- a/sound/ppc/beep.c +++ b/sound/ppc/beep.c @@ -208,7 +208,7 @@ int snd_pmac_attach_beep(struct snd_pmac *chip) void *dmabuf; int err = -ENOMEM; - beep = kzalloc_obj(*beep, GFP_KERNEL); + beep = kzalloc_obj(*beep); if (! beep) return -ENOMEM; dmabuf = dma_alloc_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4, diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c index 12829f724d86..f35cb870d26d 100644 --- a/sound/ppc/daca.c +++ b/sound/ppc/daca.c @@ -244,7 +244,7 @@ int snd_pmac_daca_init(struct snd_pmac *chip) request_module("i2c-powermac"); - mix = kzalloc_obj(*mix, GFP_KERNEL); + mix = kzalloc_obj(*mix); if (! mix) return -ENOMEM; chip->mixer_data = mix; diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 1384484fd996..ba2048ee6550 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -1143,7 +1143,7 @@ int snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) *chip_return = NULL; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return -ENOMEM; chip->card = card; diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 6cc51dcecb7e..139c7b25927a 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c @@ -1348,7 +1348,7 @@ int snd_pmac_tumbler_init(struct snd_pmac *chip) request_module("i2c-powermac"); - mix = kzalloc_obj(*mix, GFP_KERNEL); + mix = kzalloc_obj(*mix); if (! mix) return -ENOMEM; mix->headphone_irq = -1; diff --git a/sound/sh/aica.c b/sound/sh/aica.c index f6a80f04d043..9438c3a68ee9 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -330,7 +330,7 @@ static int snd_aicapcm_pcm_open(struct snd_pcm_substream if (!enable) return -ENOENT; dreamcastcard = substream->pcm->private_data; - channel = kmalloc_obj(struct aica_channel, GFP_KERNEL); + channel = kmalloc_obj(struct aica_channel); if (!channel) return -ENOMEM; /* set defaults for channel */ @@ -559,7 +559,7 @@ static int snd_aica_probe(struct platform_device *devptr) { int err; struct snd_card_aica *dreamcastcard; - dreamcastcard = kzalloc_obj(struct snd_card_aica, GFP_KERNEL); + dreamcastcard = kzalloc_obj(struct snd_card_aica); if (unlikely(!dreamcastcard)) return -ENOMEM; err = snd_card_new(&devptr->dev, index, SND_AICA_DRIVER, diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index e0ba12662da1..2d9a2d5b824e 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c @@ -306,7 +306,7 @@ static int snd_sh_dac_create(struct snd_card *card, *rchip = NULL; - chip = kzalloc_obj(*chip, GFP_KERNEL); + chip = kzalloc_obj(*chip); if (chip == NULL) return -ENOMEM; diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 19c09ba2b510..c76a4bcc9645 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -775,7 +775,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_runtime *runtime = substream->runtime; struct audio_drv_data *intr_data = dev_get_drvdata(component->dev); struct audio_substream_data *adata = - kzalloc_obj(struct audio_substream_data, GFP_KERNEL); + kzalloc_obj(struct audio_substream_data); if (!adata) return -ENOMEM; diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index 66a30da4b801..88613569fd64 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -196,7 +196,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs struct acp_stream *stream; int ret; - stream = kzalloc_obj(*stream, GFP_KERNEL); + stream = kzalloc_obj(*stream); if (!stream) return -ENOMEM; diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c index c1c28fee0496..c30ccf23005a 100644 --- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c +++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c @@ -395,13 +395,13 @@ static int soc_card_dai_links_create(struct snd_soc_card *card) /* One per DAI link, worst case is a DAI link for every endpoint */ struct asoc_sdw_dailink *soc_dais __free(kfree) = - kzalloc_objs(*soc_dais, num_ends, GFP_KERNEL); + kzalloc_objs(*soc_dais, num_ends); if (!soc_dais) return -ENOMEM; /* One per endpoint, ie. each DAI on each codec/amp */ struct asoc_sdw_endpoint *soc_ends __free(kfree) = - kzalloc_objs(*soc_ends, num_ends, GFP_KERNEL); + kzalloc_objs(*soc_ends, num_ends); if (!soc_ends) return -ENOMEM; diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c index 3319f0996fe6..a0fd8a6f9970 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -288,13 +288,13 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) /* One per DAI link, worst case is a DAI link for every endpoint */ struct asoc_sdw_dailink *sof_dais __free(kfree) = - kzalloc_objs(*sof_dais, num_ends, GFP_KERNEL); + kzalloc_objs(*sof_dais, num_ends); if (!sof_dais) return -ENOMEM; /* One per endpoint, ie. each DAI on each codec/amp */ struct asoc_sdw_endpoint *sof_ends __free(kfree) = - kzalloc_objs(*sof_ends, num_ends, GFP_KERNEL); + kzalloc_objs(*sof_ends, num_ends); if (!sof_ends) return -ENOMEM; diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c index 5a4ba65847fd..7c529fc6ba99 100644 --- a/sound/soc/amd/ps/ps-pdm-dma.c +++ b/sound/soc/amd/ps/ps-pdm-dma.c @@ -189,7 +189,7 @@ static int acp63_pdm_dma_open(struct snd_soc_component *component, runtime = substream->runtime; adata = dev_get_drvdata(component->dev); - pdm_data = kzalloc_obj(*pdm_data, GFP_KERNEL); + pdm_data = kzalloc_obj(*pdm_data); if (!pdm_data) return -EINVAL; diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c index 0c7af398de3a..366d7c4bb07e 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -318,7 +318,7 @@ static int acp63_sdw_dma_open(struct snd_soc_component *component, runtime = substream->runtime; cpu_dai = snd_soc_rtd_to_cpu(prtd, 0); amd_manager = snd_soc_dai_get_drvdata(cpu_dai); - stream = kzalloc_obj(*stream, GFP_KERNEL); + stream = kzalloc_obj(*stream); if (!stream) return -ENOMEM; diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 2716c4e18c1f..4529404ebd93 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -218,7 +218,7 @@ static int acp3x_dma_open(struct snd_soc_component *component, prtd = snd_soc_substream_to_rtd(substream); component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); adata = dev_get_drvdata(component->dev); - i2s_data = kzalloc_obj(*i2s_data, GFP_KERNEL); + i2s_data = kzalloc_obj(*i2s_data); if (!i2s_data) return -EINVAL; diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index c2dd512118ad..e832c7c4b96f 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -211,7 +211,7 @@ static int acp_pdm_dma_open(struct snd_soc_component *component, runtime = substream->runtime; adata = dev_get_drvdata(component->dev); - pdm_data = kzalloc_obj(*pdm_data, GFP_KERNEL); + pdm_data = kzalloc_obj(*pdm_data); if (!pdm_data) return -EINVAL; diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c index c52d2bed5c6c..6ce82cd8859b 100644 --- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c +++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c @@ -213,7 +213,7 @@ static int acp5x_dma_open(struct snd_soc_component *component, component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); adata = dev_get_drvdata(component->dev); - i2s_data = kzalloc_obj(*i2s_data, GFP_KERNEL); + i2s_data = kzalloc_obj(*i2s_data); if (!i2s_data) return -ENOMEM; diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c index b4fece9d3fac..1c8aad849916 100644 --- a/sound/soc/amd/yc/acp6x-pdm-dma.c +++ b/sound/soc/amd/yc/acp6x-pdm-dma.c @@ -187,7 +187,7 @@ static int acp6x_pdm_dma_open(struct snd_soc_component *component, runtime = substream->runtime; adata = dev_get_drvdata(component->dev); - pdm_data = kzalloc_obj(*pdm_data, GFP_KERNEL); + pdm_data = kzalloc_obj(*pdm_data); if (!pdm_data) return -EINVAL; diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c index 3b3e6b2b3a50..1a0c584801f0 100644 --- a/sound/soc/atmel/atmel-pcm-pdc.c +++ b/sound/soc/atmel/atmel-pcm-pdc.c @@ -288,7 +288,7 @@ static int atmel_pcm_open(struct snd_soc_component *component, if (ret < 0) goto out; - prtd = kzalloc_obj(struct atmel_runtime_data, GFP_KERNEL); + prtd = kzalloc_obj(struct atmel_runtime_data); if (prtd == NULL) { ret = -ENOMEM; goto out; diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index d31508419fe3..ec7233ce1f78 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -706,7 +706,7 @@ static int mchp_pdmc_add_chmap_ctls(struct snd_pcm *pcm, struct mchp_pdmc *dd) if (WARN_ON(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].chmap_kctl)) return -EBUSY; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; info->pcm = pcm; diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index 46bcdaa0532c..bf5f2185c526 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c @@ -81,7 +81,7 @@ static int au1000_setup_dma_link(struct audio_stream *stream, stream->period_size = period_bytes; stream->periods = periods; - stream->buffer = kmalloc_obj(struct pcm_period, GFP_KERNEL); + stream->buffer = kmalloc_obj(struct pcm_period); if (!stream->buffer) return -ENOMEM; pointer = stream->buffer; diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-pcm-whistler.c index a7bc7060f742..6a3fd0d89365 100644 --- a/sound/soc/bcm/bcm63xx-pcm-whistler.c +++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c @@ -210,7 +210,7 @@ static int bcm63xx_pcm_open(struct snd_soc_component *component, goto out; ret = -ENOMEM; - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (!prtd) goto out; diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index b0383eb47407..c0dc69ce4d0e 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -346,7 +346,7 @@ static int cx20442_component_probe(struct snd_soc_component *component) { struct cx20442_priv *cx20442; - cx20442 = kzalloc_obj(struct cx20442_priv, GFP_KERNEL); + cx20442 = kzalloc_obj(struct cx20442_priv); if (cx20442 == NULL) return -ENOMEM; diff --git a/sound/soc/codecs/pcm6240.c b/sound/soc/codecs/pcm6240.c index 6911de5a8c7e..9d86793f1958 100644 --- a/sound/soc/codecs/pcm6240.c +++ b/sound/soc/codecs/pcm6240.c @@ -1234,7 +1234,7 @@ static struct pcmdevice_config_info *pcmdevice_add_config(void *ctxt, struct pcmdevice_block_data **bk_da; unsigned int config_offset = 0, i; - cfg_info = kzalloc_obj(struct pcmdevice_config_info, GFP_KERNEL); + cfg_info = kzalloc_obj(struct pcmdevice_config_info); if (!cfg_info) { *status = -ENOMEM; goto out; @@ -1276,7 +1276,7 @@ static struct pcmdevice_config_info *pcmdevice_add_config(void *ctxt, __func__, i, cfg_info->nblocks); break; } - bk_da[i] = kzalloc_obj(struct pcmdevice_block_data, GFP_KERNEL); + bk_da[i] = kzalloc_obj(struct pcmdevice_block_data); if (!bk_da[i]) { *status = -ENOMEM; break; @@ -1548,7 +1548,7 @@ static int pcmdev_regbin_ready(const struct firmware *fmw, void *ctxt) ret = -EINVAL; goto out; } - cfg_info = kzalloc_objs(*cfg_info, fw_hdr->nconfig, GFP_KERNEL); + cfg_info = kzalloc_objs(*cfg_info, fw_hdr->nconfig); if (!cfg_info) { pcm_dev->fw_state = PCMDEVICE_FW_LOAD_FAILED; ret = -ENOMEM; diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c index d3ded7d5efa1..3304d20ab2ad 100644 --- a/sound/soc/codecs/tas2781-fmwlib.c +++ b/sound/soc/codecs/tas2781-fmwlib.c @@ -176,7 +176,7 @@ static struct tasdevice_config_info *tasdevice_add_config( * of audio cases, flexible configs have been introduced in the * dsp firmware. */ - cfg_info = kzalloc_obj(struct tasdevice_config_info, GFP_KERNEL); + cfg_info = kzalloc_obj(struct tasdevice_config_info); if (!cfg_info) { *status = -ENOMEM; goto out; @@ -232,7 +232,7 @@ static struct tasdevice_config_info *tasdevice_add_config( __func__, i, cfg_info->nblocks); break; } - bk_da[i] = kzalloc_obj(struct tasdev_blk_data, GFP_KERNEL); + bk_da[i] = kzalloc_obj(struct tasdev_blk_data); if (!bk_da[i]) { *status = -ENOMEM; break; @@ -379,7 +379,7 @@ int tasdevice_rca_parser(void *context, const struct firmware *fmw) goto out; } - cfg_info = kzalloc_objs(*cfg_info, fw_hdr->nconfig, GFP_KERNEL); + cfg_info = kzalloc_objs(*cfg_info, fw_hdr->nconfig); if (!cfg_info) { ret = -ENOMEM; tas_priv->fw_state = TASDEVICE_DSP_FW_FAIL; @@ -2268,7 +2268,7 @@ static int tasdevice_dspfw_ready(const struct firmware *fmw, return -EINVAL; } - tas_priv->fmw = kzalloc_obj(struct tasdevice_fw, GFP_KERNEL); + tas_priv->fmw = kzalloc_obj(struct tasdevice_fw); if (!tas_priv->fmw) return -ENOMEM; diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index ab3620761f5d..90008d2d06e2 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -733,8 +733,8 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) s32 img_sz, ret = 0, cur_file = 0; s32 offset = 0; - struct tas_fw_hdr *hdr __free(kfree) = kzalloc_obj(*hdr, GFP_KERNEL); - struct tas_fw_file *file __free(kfree) = kzalloc_obj(*file, GFP_KERNEL); + struct tas_fw_hdr *hdr __free(kfree) = kzalloc_obj(*hdr); + struct tas_fw_file *file __free(kfree) = kzalloc_obj(*file); if (!file || !hdr) { ret = -ENOMEM; goto out; diff --git a/sound/soc/codecs/wcd-clsh-v2.c b/sound/soc/codecs/wcd-clsh-v2.c index 1da1a85cbe6b..13d07296916f 100644 --- a/sound/soc/codecs/wcd-clsh-v2.c +++ b/sound/soc/codecs/wcd-clsh-v2.c @@ -883,7 +883,7 @@ struct wcd_clsh_ctrl *wcd_clsh_ctrl_alloc(struct snd_soc_component *comp, { struct wcd_clsh_ctrl *ctrl; - ctrl = kzalloc_obj(*ctrl, GFP_KERNEL); + ctrl = kzalloc_obj(*ctrl); if (!ctrl) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c index 56b112946b37..bb0c8478a8eb 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.c +++ b/sound/soc/codecs/wcd-mbhc-v2.c @@ -1515,7 +1515,7 @@ struct wcd_mbhc *wcd_mbhc_init(struct snd_soc_component *component, return ERR_PTR(-EINVAL); } - mbhc = kzalloc_obj(*mbhc, GFP_KERNEL); + mbhc = kzalloc_obj(*mbhc); if (!mbhc) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index f6166428a000..2a8c61a72c17 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -396,7 +396,7 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_component *comp rec->command, rec->length); len = rec->length + 8; - xfer = kzalloc_obj(*xfer, GFP_KERNEL); + xfer = kzalloc_obj(*xfer); if (!xfer) { ret = -ENOMEM; goto abort; diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 8a584fd8f5de..1f4aac4017cf 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -542,7 +542,7 @@ static void wm_adsp_ctl_work(struct work_struct *work) cs_dsp); struct snd_kcontrol_new *kcontrol; - kcontrol = kzalloc_obj(*kcontrol, GFP_KERNEL); + kcontrol = kzalloc_obj(*kcontrol); if (!kcontrol) return; @@ -627,7 +627,7 @@ int wm_adsp_control_add(struct cs_dsp_coeff_ctl *cs_ctl) " %.*s", cs_ctl->subname_len - skip, cs_ctl->subname + skip); } - ctl = kzalloc_obj(*ctl, GFP_KERNEL); + ctl = kzalloc_obj(*ctl); if (!ctl) return -ENOMEM; ctl->cs_ctl = cs_ctl; @@ -1259,7 +1259,7 @@ int wm_adsp_compr_open(struct wm_adsp *dsp, struct snd_compr_stream *stream) } } - compr = kzalloc_obj(*compr, GFP_KERNEL); + compr = kzalloc_obj(*compr); if (!compr) { ret = -ENOMEM; goto out; @@ -1477,7 +1477,7 @@ static struct wm_adsp_compr_buf *wm_adsp_buffer_alloc(struct wm_adsp *dsp) { struct wm_adsp_compr_buf *buf; - buf = kzalloc_obj(*buf, GFP_KERNEL); + buf = kzalloc_obj(*buf); if (!buf) return NULL; diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c index 7a16a895cb0e..7d39378c0622 100644 --- a/sound/soc/fsl/fsl_asrc_m2m.c +++ b/sound/soc/fsl/fsl_asrc_m2m.c @@ -155,7 +155,7 @@ static int asrc_dmaconfig(struct fsl_asrc_pair *pair, if (buf_len % max_period_size) sg_len += 1; - sg = kmalloc_objs(*sg, sg_len, GFP_KERNEL); + sg = kmalloc_objs(*sg, sg_len); if (!sg) return -ENOMEM; @@ -420,7 +420,7 @@ static struct sg_table *fsl_asrc_m2m_map_dma_buf(struct dma_buf_attachment *atta struct snd_dma_buffer *dmab = attachment->dmabuf->priv; struct sg_table *sgt; - sgt = kmalloc_obj(*sgt, GFP_KERNEL); + sgt = kmalloc_obj(*sgt); if (!sgt) return NULL; diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 44834dba4cb7..26ddbe867b58 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c @@ -848,7 +848,7 @@ static int fsl_soc_dma_probe(struct platform_device *pdev) return ret; } - dma = kzalloc_obj(*dma, GFP_KERNEL); + dma = kzalloc_obj(*dma); if (!dma) { of_node_put(ssi_np); return -ENOMEM; diff --git a/sound/soc/fsl/fsl_qmc_audio.c b/sound/soc/fsl/fsl_qmc_audio.c index 747c8253b77b..43d401ae2d03 100644 --- a/sound/soc/fsl/fsl_qmc_audio.c +++ b/sound/soc/fsl/fsl_qmc_audio.c @@ -316,7 +316,7 @@ static int qmc_audio_pcm_open(struct snd_soc_component *component, if (ret < 0) return ret; - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (!prtd) return -ENOMEM; diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c index 8a1a7c89781f..d51a3de493cb 100644 --- a/sound/soc/fsl/imx-pcm-fiq.c +++ b/sound/soc/fsl/imx-pcm-fiq.c @@ -176,7 +176,7 @@ static int snd_imx_open(struct snd_soc_component *component, struct imx_pcm_runtime_data *iprtd; int ret; - iprtd = kzalloc_obj(*iprtd, GFP_KERNEL); + iprtd = kzalloc_obj(*iprtd); if (iprtd == NULL) return -ENOMEM; runtime->private_data = iprtd; diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 41255ff305b3..a593a95aa532 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c @@ -333,7 +333,7 @@ int mpc5200_audio_dma_create(struct platform_device *op) } /* Allocate and initialize the driver private data */ - psc_dma = kzalloc_obj(*psc_dma, GFP_KERNEL); + psc_dma = kzalloc_obj(*psc_dma); if (!psc_dma) { ret = -ENOMEM; goto out_unmap; diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 44b62f5615f2..db07817a8024 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -211,7 +211,7 @@ static int p1022_ds_probe(struct platform_device *pdev) return -EINVAL; } - mdata = kzalloc_obj(struct machine_data, GFP_KERNEL); + mdata = kzalloc_obj(struct machine_data); if (!mdata) { ret = -ENOMEM; goto error_put; diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c index 43a95cd590cf..f80d6d04e791 100644 --- a/sound/soc/fsl/p1022_rdk.c +++ b/sound/soc/fsl/p1022_rdk.c @@ -226,7 +226,7 @@ static int p1022_rdk_probe(struct platform_device *pdev) return -EINVAL; } - mdata = kzalloc_obj(struct machine_data, GFP_KERNEL); + mdata = kzalloc_obj(struct machine_data); if (!mdata) { ret = -ENOMEM; goto error_put; diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 965d7bb55929..8a5f41704739 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -553,7 +553,7 @@ int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev) struct snd_soc_card *card = simple_priv_to_card(priv); int ret = -ENOMEM; - struct link_info *li __free(kfree) = kzalloc_obj(*li, GFP_KERNEL); + struct link_info *li __free(kfree) = kzalloc_obj(*li); if (!li) goto end; diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 85043bc3c3d3..0202ed0ee78e 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -1305,7 +1305,7 @@ int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev, struct snd_soc_card *card = simple_priv_to_card(priv); int ret; - struct link_info *li __free(kfree) = kzalloc_obj(*li, GFP_KERNEL); + struct link_info *li __free(kfree) = kzalloc_obj(*li); if (!li) return -ENOMEM; diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 5bc6d7cd1921..06638f9a74b8 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -726,7 +726,7 @@ static int simple_probe(struct platform_device *pdev) card->driver_name = "simple-card"; ret = -ENOMEM; - struct link_info *li __free(kfree) = kzalloc_obj(*li, GFP_KERNEL); + struct link_info *li __free(kfree) = kzalloc_obj(*li); if (!li) goto end; diff --git a/sound/soc/intel/atom/sst-mfld-platform-compress.c b/sound/soc/intel/atom/sst-mfld-platform-compress.c index 877df5ce156d..b0ba1af0a65f 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-compress.c +++ b/sound/soc/intel/atom/sst-mfld-platform-compress.c @@ -47,7 +47,7 @@ static int sst_platform_compr_open(struct snd_soc_component *component, struct snd_compr_runtime *runtime = cstream->runtime; struct sst_runtime_stream *stream; - stream = kzalloc_obj(*stream, GFP_KERNEL); + stream = kzalloc_obj(*stream); if (!stream) return -ENOMEM; diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c index e007db432b49..67caea39b557 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c @@ -306,7 +306,7 @@ static int sst_media_open(struct snd_pcm_substream *substream, struct snd_pcm_runtime *runtime = substream->runtime; struct sst_runtime_stream *stream; - stream = kzalloc_obj(*stream, GFP_KERNEL); + stream = kzalloc_obj(*stream); if (!stream) return -ENOMEM; spin_lock_init(&stream->status_lock); diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c index 5313c8ec605e..d9d695ed7cfb 100644 --- a/sound/soc/intel/atom/sst/sst.c +++ b/sound/soc/intel/atom/sst/sst.c @@ -463,7 +463,7 @@ static int intel_sst_suspend(struct device *dev) return -EBUSY; /* save the memories */ - fw_save = kzalloc_obj(*fw_save, GFP_KERNEL); + fw_save = kzalloc_obj(*fw_save); if (!fw_save) return -ENOMEM; fw_save->iram = kvzalloc(ctx->iram_end - ctx->iram_base, GFP_KERNEL); diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index bdf68d69127f..0d5e71e8a5b5 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -31,7 +31,7 @@ struct sst_block *sst_create_block(struct intel_sst_drv *ctx, struct sst_block *msg; dev_dbg(ctx->dev, "Enter\n"); - msg = kzalloc_obj(*msg, GFP_KERNEL); + msg = kzalloc_obj(*msg); if (!msg) return NULL; msg->condition = false; diff --git a/sound/soc/intel/atom/sst/sst_loader.c b/sound/soc/intel/atom/sst/sst_loader.c index 60b73c9c2306..a043443d2887 100644 --- a/sound/soc/intel/atom/sst/sst_loader.c +++ b/sound/soc/intel/atom/sst/sst_loader.c @@ -148,7 +148,7 @@ static int sst_fill_memcpy_list(struct list_head *memcpy_list, { struct sst_memcpy_list *listnode; - listnode = kzalloc_obj(*listnode, GFP_KERNEL); + listnode = kzalloc_obj(*listnode); if (listnode == NULL) return -ENOMEM; listnode->dstn = destn; diff --git a/sound/soc/intel/avs/path.c b/sound/soc/intel/avs/path.c index a080d85d30a6..2291f9728a54 100644 --- a/sound/soc/intel/avs/path.c +++ b/sound/soc/intel/avs/path.c @@ -880,7 +880,7 @@ avs_path_module_create(struct avs_dev *adev, if (module_id < 0) return ERR_PTR(module_id); - mod = kzalloc_obj(*mod, GFP_KERNEL); + mod = kzalloc_obj(*mod); if (!mod) return ERR_PTR(-ENOMEM); @@ -968,7 +968,7 @@ static struct avs_path_binding *avs_path_binding_create(struct avs_dev *adev, { struct avs_path_binding *binding; - binding = kzalloc_obj(*binding, GFP_KERNEL); + binding = kzalloc_obj(*binding); if (!binding) return ERR_PTR(-ENOMEM); @@ -1043,7 +1043,7 @@ avs_path_pipeline_create(struct avs_dev *adev, struct avs_path *owner, struct avs_tplg_module *tmod; int ret, i; - ppl = kzalloc_obj(*ppl, GFP_KERNEL); + ppl = kzalloc_obj(*ppl); if (!ppl) return ERR_PTR(-ENOMEM); @@ -1173,7 +1173,7 @@ static struct avs_path *avs_path_create_unlocked(struct avs_dev *adev, u32 dma_i struct avs_path *path; int ret; - path = kzalloc_obj(*path, GFP_KERNEL); + path = kzalloc_obj(*path); if (!path) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c index b8f5e1185a1a..d53c2f76fcd4 100644 --- a/sound/soc/intel/avs/pcm.c +++ b/sound/soc/intel/avs/pcm.c @@ -130,7 +130,7 @@ static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_d return -EINVAL; } - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/sound/soc/intel/avs/utils.c b/sound/soc/intel/avs/utils.c index df4d4e2f6c4f..ee36725ac731 100644 --- a/sound/soc/intel/avs/utils.c +++ b/sound/soc/intel/avs/utils.c @@ -124,7 +124,7 @@ avs_module_ida_alloc(struct avs_dev *adev, struct avs_mods_info *newinfo, bool p tocopy_count = oldinfo->count; } - ida_ptrs = kzalloc_objs(*ida_ptrs, newinfo->count, GFP_KERNEL); + ida_ptrs = kzalloc_objs(*ida_ptrs, newinfo->count); if (!ida_ptrs) return -ENOMEM; @@ -132,7 +132,7 @@ avs_module_ida_alloc(struct avs_dev *adev, struct avs_mods_info *newinfo, bool p memcpy(ida_ptrs, adev->mod_idas, tocopy_count * sizeof(*ida_ptrs)); for (i = tocopy_count; i < newinfo->count; i++) { - ida_ptrs[i] = kzalloc_obj(**ida_ptrs, GFP_KERNEL); + ida_ptrs[i] = kzalloc_obj(**ida_ptrs); if (!ida_ptrs[i]) { while (i--) kfree(ida_ptrs[i]); @@ -246,7 +246,7 @@ int avs_request_firmware(struct avs_dev *adev, const struct firmware **fw_p, con } /* FW is not loaded, let's load it now and add to the list */ - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 65bc023ab01b..f230991f5f8e 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1251,12 +1251,12 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) * add one additional to act as a terminator such that code can iterate * until it hits an uninitialised DAI. */ - sof_dais = kzalloc_objs(*sof_dais, num_ends + 1, GFP_KERNEL); + sof_dais = kzalloc_objs(*sof_dais, num_ends + 1); if (!sof_dais) return -ENOMEM; /* One per endpoint, ie. each DAI on each codec/amp */ - sof_ends = kzalloc_objs(*sof_ends, num_ends, GFP_KERNEL); + sof_ends = kzalloc_objs(*sof_ends, num_ends); if (!sof_ends) { ret = -ENOMEM; goto err_dai; diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c index b3e8ea4b92b4..2c5ea4e0ff3d 100644 --- a/sound/soc/intel/catpt/pcm.c +++ b/sound/soc/intel/catpt/pcm.c @@ -263,7 +263,7 @@ static int catpt_dai_startup(struct snd_pcm_substream *substream, template = catpt_get_stream_template(substream); - stream = kzalloc_obj(*stream, GFP_KERNEL); + stream = kzalloc_obj(*stream); if (!stream) return -ENOMEM; diff --git a/sound/soc/loongson/loongson_dma.c b/sound/soc/loongson/loongson_dma.c index 8cf0feb64ff9..f26b2951bc9c 100644 --- a/sound/soc/loongson/loongson_dma.c +++ b/sound/soc/loongson/loongson_dma.c @@ -243,7 +243,7 @@ static int loongson_pcm_open(struct snd_soc_component *component, SNDRV_PCM_HW_PARAM_PERIODS); snd_soc_set_runtime_hwparams(substream, &ls_pcm_hardware); - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (!prtd) return -ENOMEM; diff --git a/sound/soc/mediatek/mt8186/mt8186-audsys-clk.c b/sound/soc/mediatek/mt8186/mt8186-audsys-clk.c index 53f30d12195b..642f4fb55ca6 100644 --- a/sound/soc/mediatek/mt8186/mt8186-audsys-clk.c +++ b/sound/soc/mediatek/mt8186/mt8186-audsys-clk.c @@ -135,7 +135,7 @@ int mt8186_audsys_clk_register(struct mtk_base_afe *afe) } /* add clk_lookup for devm_clk_get(SND_SOC_DAPM_CLOCK_SUPPLY) */ - cl = kzalloc_obj(*cl, GFP_KERNEL); + cl = kzalloc_obj(*cl); if (!cl) return -ENOMEM; diff --git a/sound/soc/mediatek/mt8188/mt8188-audsys-clk.c b/sound/soc/mediatek/mt8188/mt8188-audsys-clk.c index 2ef5ed3ee200..972f097a13ca 100644 --- a/sound/soc/mediatek/mt8188/mt8188-audsys-clk.c +++ b/sound/soc/mediatek/mt8188/mt8188-audsys-clk.c @@ -193,7 +193,7 @@ int mt8188_audsys_clk_register(struct mtk_base_afe *afe) } /* add clk_lookup for devm_clk_get(SND_SOC_DAPM_CLOCK_SUPPLY) */ - cl = kzalloc_obj(*cl, GFP_KERNEL); + cl = kzalloc_obj(*cl); if (!cl) return -ENOMEM; diff --git a/sound/soc/mediatek/mt8195/mt8195-audsys-clk.c b/sound/soc/mediatek/mt8195/mt8195-audsys-clk.c index ec069729253e..e6fefc320443 100644 --- a/sound/soc/mediatek/mt8195/mt8195-audsys-clk.c +++ b/sound/soc/mediatek/mt8195/mt8195-audsys-clk.c @@ -199,7 +199,7 @@ int mt8195_audsys_clk_register(struct mtk_base_afe *afe) } /* add clk_lookup for devm_clk_get(SND_SOC_DAPM_CLOCK_SUPPLY) */ - cl = kzalloc_obj(*cl, GFP_KERNEL); + cl = kzalloc_obj(*cl); if (!cl) return -ENOMEM; diff --git a/sound/soc/meson/aiu-fifo.c b/sound/soc/meson/aiu-fifo.c index b17a62727fc7..8b54f9681d00 100644 --- a/sound/soc/meson/aiu-fifo.c +++ b/sound/soc/meson/aiu-fifo.c @@ -196,7 +196,7 @@ int aiu_fifo_dai_probe(struct snd_soc_dai *dai) { struct aiu_fifo *fifo; - fifo = kzalloc_obj(*fifo, GFP_KERNEL); + fifo = kzalloc_obj(*fifo); if (!fifo) return -ENOMEM; diff --git a/sound/soc/meson/axg-tdm-formatter.c b/sound/soc/meson/axg-tdm-formatter.c index 1fd78790c967..f451e4dce442 100644 --- a/sound/soc/meson/axg-tdm-formatter.c +++ b/sound/soc/meson/axg-tdm-formatter.c @@ -368,7 +368,7 @@ struct axg_tdm_stream *axg_tdm_stream_alloc(struct axg_tdm_iface *iface) { struct axg_tdm_stream *ts; - ts = kzalloc_obj(*ts, GFP_KERNEL); + ts = kzalloc_obj(*ts); if (ts) { INIT_LIST_HEAD(&ts->formatter_list); mutex_init(&ts->lock); diff --git a/sound/soc/meson/meson-codec-glue.c b/sound/soc/meson/meson-codec-glue.c index bd9a91d8bc3a..2ff6066e1b6c 100644 --- a/sound/soc/meson/meson-codec-glue.c +++ b/sound/soc/meson/meson-codec-glue.c @@ -122,7 +122,7 @@ int meson_codec_glue_input_dai_probe(struct snd_soc_dai *dai) { struct meson_codec_glue_input *data; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 790e4db9d91b..c34bfa27a446 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c @@ -85,7 +85,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, clk_prepare_enable(priv->extclk); - dma = kzalloc_obj(struct snd_dmaengine_dai_dma_data, GFP_KERNEL); + dma = kzalloc_obj(struct snd_dmaengine_dai_dma_data); if (!dma) return -ENOMEM; dma->chan_name = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? @@ -749,7 +749,7 @@ static int pxa_ssp_probe(struct snd_soc_dai *dai) struct ssp_priv *priv; int ret; - priv = kzalloc_obj(struct ssp_priv, GFP_KERNEL); + priv = kzalloc_obj(struct ssp_priv); if (!priv) return -ENOMEM; diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index 84909af310b4..ce6896cc015d 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -202,7 +202,7 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component, struct regmap *map; unsigned int dai_id = cpu_dai->driver->id; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c index b1851dac61fa..43d877322bae 100644 --- a/sound/soc/qcom/qdsp6/q6afe.c +++ b/sound/soc/qcom/qdsp6/q6afe.c @@ -1359,7 +1359,7 @@ void q6afe_tdm_port_prepare(struct q6afe_port *port, pcfg->tdm_cfg.slot_width = cfg->slot_width; pcfg->tdm_cfg.slot_mask = cfg->slot_mask; - port->scfg = kzalloc_obj(*port->scfg, GFP_KERNEL); + port->scfg = kzalloc_obj(*port->scfg); if (!port->scfg) return; diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index dcd960aeab2f..de3bdac3e791 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -348,7 +348,7 @@ static int q6apm_dai_open(struct snd_soc_component *component, return -EINVAL; } - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (prtd == NULL) return -ENOMEM; @@ -490,7 +490,7 @@ static int q6apm_dai_compr_open(struct snd_soc_component *component, if (!pdata) return -EINVAL; - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (prtd == NULL) return -ENOMEM; diff --git a/sound/soc/qcom/qdsp6/q6apm.c b/sound/soc/qcom/qdsp6/q6apm.c index 99d2dcdfac25..44841fde3856 100644 --- a/sound/soc/qcom/qdsp6/q6apm.c +++ b/sound/soc/qcom/qdsp6/q6apm.c @@ -57,7 +57,7 @@ static struct audioreach_graph *q6apm_get_audioreach_graph(struct q6apm *apm, ui if (!info) return ERR_PTR(-ENODEV); - graph = kzalloc_obj(*graph, GFP_KERNEL); + graph = kzalloc_obj(*graph); if (!graph) return ERR_PTR(-ENOMEM); @@ -220,7 +220,7 @@ int q6apm_map_memory_regions(struct q6apm_graph *graph, unsigned int dir, phys_a return 0; } - buf = kzalloc_objs(struct audio_buffer, periods, GFP_KERNEL); + buf = kzalloc_objs(struct audio_buffer, periods); if (!buf) { mutex_unlock(&graph->lock); return -ENOMEM; @@ -615,7 +615,7 @@ struct q6apm_graph *q6apm_graph_open(struct device *dev, q6apm_cb cb, return ERR_CAST(ar_graph); } - graph = kzalloc_obj(*graph, GFP_KERNEL); + graph = kzalloc_obj(*graph); if (!graph) { ret = -ENOMEM; goto put_ar_graph; diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 99c1969d5cdc..9e3d176f50c2 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -378,7 +378,7 @@ static int q6asm_dai_open(struct snd_soc_component *component, return -EINVAL; } - prtd = kzalloc_obj(struct q6asm_dai_rtd, GFP_KERNEL); + prtd = kzalloc_obj(struct q6asm_dai_rtd); if (prtd == NULL) return -ENOMEM; @@ -621,7 +621,7 @@ static int q6asm_dai_compr_open(struct snd_soc_component *component, return -EINVAL; } - prtd = kzalloc_obj(*prtd, GFP_KERNEL); + prtd = kzalloc_obj(*prtd); if (!prtd) return -ENOMEM; diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 424306da4a25..de0bd8fd08ee 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -850,7 +850,7 @@ struct audio_client *q6asm_audio_client_alloc(struct device *dev, q6asm_cb cb, return ac; } - ac = kzalloc_obj(*ac, GFP_KERNEL); + ac = kzalloc_obj(*ac); if (!ac) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/qcom/qdsp6/q6core.c b/sound/soc/qcom/qdsp6/q6core.c index 393488c571cd..48825756a7ab 100644 --- a/sound/soc/qcom/qdsp6/q6core.c +++ b/sound/soc/qcom/qdsp6/q6core.c @@ -327,7 +327,7 @@ EXPORT_SYMBOL_GPL(q6core_is_adsp_ready); static int q6core_probe(struct apr_device *adev) { - g_core = kzalloc_obj(*g_core, GFP_KERNEL); + g_core = kzalloc_obj(*g_core); if (!g_core) return -ENOMEM; diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index c3b26b318718..7386226046fa 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -1133,7 +1133,7 @@ static int q6pcm_routing_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - routing_data = kzalloc_obj(*routing_data, GFP_KERNEL); + routing_data = kzalloc_obj(*routing_data); if (!routing_data) return -ENOMEM; diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c index 076b55c1f729..e87ad2f65e5d 100644 --- a/sound/soc/qcom/qdsp6/topology.c +++ b/sound/soc/qcom/qdsp6/topology.c @@ -42,7 +42,7 @@ static struct audioreach_graph_info *audioreach_tplg_alloc_graph_info(struct q6a } *found = false; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return ERR_PTR(-ENOMEM); @@ -92,7 +92,7 @@ static struct audioreach_sub_graph *audioreach_tplg_alloc_sub_graph(struct q6apm } *found = false; - sg = kzalloc_obj(*sg, GFP_KERNEL); + sg = kzalloc_obj(*sg); if (!sg) return ERR_PTR(-ENOMEM); @@ -134,7 +134,7 @@ static struct audioreach_container *audioreach_tplg_alloc_container(struct q6apm } *found = false; - cont = kzalloc_obj(*cont, GFP_KERNEL); + cont = kzalloc_obj(*cont); if (!cont) return ERR_PTR(-ENOMEM); @@ -176,7 +176,7 @@ static struct audioreach_module *audioreach_tplg_alloc_module(struct q6apm *apm, return mod; } *found = false; - mod = kzalloc_obj(*mod, GFP_KERNEL); + mod = kzalloc_obj(*mod); if (!mod) return ERR_PTR(-ENOMEM); @@ -830,7 +830,7 @@ static int audioreach_widget_load_mixer(struct snd_soc_component *component, w_array = &tplg_w->priv.array[0]; - scontrol = kzalloc_obj(*scontrol, GFP_KERNEL); + scontrol = kzalloc_obj(*scontrol); if (!scontrol) return -ENOMEM; @@ -1247,7 +1247,7 @@ static int audioreach_control_load(struct snd_soc_component *scomp, int index, struct snd_soc_dobj *dobj; int ret = 0; - scontrol = kzalloc_obj(*scontrol, GFP_KERNEL); + scontrol = kzalloc_obj(*scontrol); if (!scontrol) return -ENOMEM; diff --git a/sound/soc/renesas/siu_dai.c b/sound/soc/renesas/siu_dai.c index 5e7751c8b1e3..039b1264d90d 100644 --- a/sound/soc/renesas/siu_dai.c +++ b/sound/soc/renesas/siu_dai.c @@ -453,7 +453,7 @@ int siu_init_port(int port, struct siu_port **port_info, struct snd_card *card) struct snd_kcontrol *kctrl; int ret; - *port_info = kzalloc_obj(**port_info, GFP_KERNEL); + *port_info = kzalloc_obj(**port_info); if (!*port_info) return -ENOMEM; diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 58fade080976..beb7e09e9fac 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -290,7 +290,7 @@ static int idma_open(struct snd_soc_component *component, snd_soc_set_runtime_hwparams(substream, &idma_hardware); - prtd = kzalloc_obj(struct idma_ctrl, GFP_KERNEL); + prtd = kzalloc_obj(struct idma_ctrl); if (prtd == NULL) return -ENOMEM; diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c index 51ccaa14b443..a0191e5a5a7d 100644 --- a/sound/soc/sdca/sdca_asoc.c +++ b/sound/soc/sdca/sdca_asoc.c @@ -1349,7 +1349,7 @@ int sdca_asoc_set_constraints(struct device *dev, struct regmap *regmap, dev_dbg(dev, "%s: set channel constraint mask: %#x\n", entity->label, channel_mask); - constraint = kzalloc_obj(*constraint, GFP_KERNEL); + constraint = kzalloc_obj(*constraint); if (!constraint) return -ENOMEM; diff --git a/sound/soc/sdca/sdca_function_device.c b/sound/soc/sdca/sdca_function_device.c index dd419f426ba6..feacfbc6a518 100644 --- a/sound/soc/sdca/sdca_function_device.c +++ b/sound/soc/sdca/sdca_function_device.c @@ -39,7 +39,7 @@ static struct sdca_dev *sdca_dev_register(struct device *parent, int ret; int rc; - sdev = kzalloc_obj(*sdev, GFP_KERNEL); + sdev = kzalloc_obj(*sdev); if (!sdev) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/sdca/sdca_jack.c b/sound/soc/sdca/sdca_jack.c index 0ce9cf8f850c..49d317d3b8c8 100644 --- a/sound/soc/sdca/sdca_jack.c +++ b/sound/soc/sdca/sdca_jack.c @@ -99,7 +99,7 @@ int sdca_jack_process(struct sdca_interrupt *interrupt) if (kctl) { struct soc_enum *soc_enum = (struct soc_enum *)kctl->private_value; - ucontrol = kzalloc_obj(*ucontrol, GFP_KERNEL); + ucontrol = kzalloc_obj(*ucontrol); if (!ucontrol) return -ENOMEM; diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c index f71413a186b8..5f81e3606655 100644 --- a/sound/soc/soc-ac97.c +++ b/sound/soc/soc-ac97.c @@ -181,7 +181,7 @@ struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *componen { struct snd_ac97 *ac97; - ac97 = kzalloc_obj(struct snd_ac97, GFP_KERNEL); + ac97 = kzalloc_obj(struct snd_ac97); if (ac97 == NULL) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7c1f2c93d5d3..d0fffef65daf 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -507,7 +507,7 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime( /* * for rtd->dev */ - dev = kzalloc_obj(struct device, GFP_KERNEL); + dev = kzalloc_obj(struct device); if (!dev) return NULL; diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 54ee54dcba87..5abfb183c3b1 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -638,7 +638,7 @@ static int dapm_add_path( if (ret) return ret; - path = kzalloc_obj(struct snd_soc_dapm_path, GFP_KERNEL); + path = kzalloc_obj(struct snd_soc_dapm_path); if (!path) return -ENOMEM; @@ -713,7 +713,7 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget, const char *name; int ret; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; @@ -3977,7 +3977,7 @@ static int dapm_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w, if (!params) return -ENOMEM; - runtime = kzalloc_obj(*runtime, GFP_KERNEL); + runtime = kzalloc_obj(*runtime); if (!runtime) return -ENOMEM; diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 1a2b5a8fd198..dbec46703b35 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -437,7 +437,7 @@ int snd_dmaengine_pcm_register(struct device *dev, struct dmaengine_pcm *pcm; int ret; - pcm = kzalloc_obj(*pcm, GFP_KERNEL); + pcm = kzalloc_obj(*pcm); if (!pcm) return -ENOMEM; diff --git a/sound/soc/soc-ops-test.c b/sound/soc/soc-ops-test.c index 0f924a6b0d15..dc83107930e4 100644 --- a/sound/soc/soc-ops-test.c +++ b/sound/soc/soc-ops-test.c @@ -486,7 +486,7 @@ static void soc_ops_test_access(struct kunit *test) /* it is too large struct. use kzalloc() */ struct snd_ctl_elem_value *result; - result = kzalloc_obj(*result, GFP_KERNEL); + result = kzalloc_obj(*result); if (!result) return; diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 1d2ebb4f63e4..f966d4e13c7f 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -454,7 +454,7 @@ static int snd_soc_clip_to_platform_max(struct snd_kcontrol *kctl) if (!mc->platform_max) return 0; - uctl = kzalloc_obj(*uctl, GFP_KERNEL); + uctl = kzalloc_obj(*uctl); if (!uctl) return -ENOMEM; diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index b3e3ffdcce6f..afa9fad4457f 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1323,7 +1323,7 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe, be_substream->pcm->nonatomic = 1; } - dpcm = kzalloc_obj(struct snd_soc_dpcm, GFP_KERNEL); + dpcm = kzalloc_obj(struct snd_soc_dpcm); if (!dpcm) return -ENOMEM; diff --git a/sound/soc/soc-usb.c b/sound/soc/soc-usb.c index 57e537edb637..6386404a8db8 100644 --- a/sound/soc/soc-usb.c +++ b/sound/soc/soc-usb.c @@ -189,7 +189,7 @@ struct snd_soc_usb *snd_soc_usb_allocate_port(struct snd_soc_component *componen { struct snd_soc_usb *usb; - usb = kzalloc_obj(*usb, GFP_KERNEL); + usb = kzalloc_obj(*usb); if (!usb) return ERR_PTR(-ENOMEM); diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index f68fa3551df8..96570121aae0 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -101,7 +101,7 @@ static int sof_compr_open(struct snd_soc_component *component, struct snd_sof_pcm *spcm; int dir; - sstream = kzalloc_obj(*sstream, GFP_KERNEL); + sstream = kzalloc_obj(*sstream); if (!sstream) return -ENOMEM; diff --git a/sound/soc/sof/intel/apl.c b/sound/soc/sof/intel/apl.c index 31494c686c72..b0072601181e 100644 --- a/sound/soc/sof/intel/apl.c +++ b/sound/soc/sof/intel/apl.c @@ -54,7 +54,7 @@ int sof_apl_ops_init(struct snd_sof_dev *sdev) if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { struct sof_ipc4_fw_data *ipc4_data; - sdev->private = kzalloc_obj(*ipc4_data, GFP_KERNEL); + sdev->private = kzalloc_obj(*ipc4_data); if (!sdev->private) return -ENOMEM; diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index b55dd9ace41f..660c1475e5a4 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -401,7 +401,7 @@ int sof_cnl_ops_init(struct snd_sof_dev *sdev) if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { struct sof_ipc4_fw_data *ipc4_data; - sdev->private = kzalloc_obj(*ipc4_data, GFP_KERNEL); + sdev->private = kzalloc_obj(*ipc4_data); if (!sdev->private) return -ENOMEM; diff --git a/sound/soc/sof/intel/hda-mlink.c b/sound/soc/sof/intel/hda-mlink.c index c9790f37928f..ce603a2343de 100644 --- a/sound/soc/sof/intel/hda-mlink.c +++ b/sound/soc/sof/intel/hda-mlink.c @@ -392,7 +392,7 @@ static int hda_ml_alloc_h2link(struct hdac_bus *bus, int index) struct hdac_ext_link *hlink; int ret; - h2link = kzalloc_obj(*h2link, GFP_KERNEL); + h2link = kzalloc_obj(*h2link); if (!h2link) return -ENOMEM; diff --git a/sound/soc/sof/intel/icl.c b/sound/soc/sof/intel/icl.c index 8079a1363b45..c1018893750c 100644 --- a/sound/soc/sof/intel/icl.c +++ b/sound/soc/sof/intel/icl.c @@ -122,7 +122,7 @@ int sof_icl_ops_init(struct snd_sof_dev *sdev) if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { struct sof_ipc4_fw_data *ipc4_data; - sdev->private = kzalloc_obj(*ipc4_data, GFP_KERNEL); + sdev->private = kzalloc_obj(*ipc4_data); if (!sdev->private) return -ENOMEM; diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c index e46b0fd5746f..9503d00e6002 100644 --- a/sound/soc/sof/intel/mtl.c +++ b/sound/soc/sof/intel/mtl.c @@ -734,7 +734,7 @@ int sof_mtl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops) dsp_ops->core_get = mtl_dsp_core_get; dsp_ops->core_put = mtl_dsp_core_put; - sdev->private = kzalloc_obj(struct sof_ipc4_fw_data, GFP_KERNEL); + sdev->private = kzalloc_obj(struct sof_ipc4_fw_data); if (!sdev->private) return -ENOMEM; diff --git a/sound/soc/sof/intel/skl.c b/sound/soc/sof/intel/skl.c index eb94027a5724..90519ebd3168 100644 --- a/sound/soc/sof/intel/skl.c +++ b/sound/soc/sof/intel/skl.c @@ -62,7 +62,7 @@ int sof_skl_ops_init(struct snd_sof_dev *sdev) /* probe/remove/shutdown */ sof_skl_ops.shutdown = hda_dsp_shutdown; - sdev->private = kzalloc_obj(*ipc4_data, GFP_KERNEL); + sdev->private = kzalloc_obj(*ipc4_data); if (!sdev->private) return -ENOMEM; diff --git a/sound/soc/sof/intel/telemetry.c b/sound/soc/sof/intel/telemetry.c index 2e2cc6e2ea3a..967b5b577f03 100644 --- a/sound/soc/sof/intel/telemetry.c +++ b/sound/soc/sof/intel/telemetry.c @@ -29,7 +29,7 @@ void sof_ipc4_intel_dump_telemetry_state(struct snd_sof_dev *sdev, u32 flags) if (!slot_offset) return; - telemetry_data = kmalloc_obj(*telemetry_data, GFP_KERNEL); + telemetry_data = kmalloc_obj(*telemetry_data); if (!telemetry_data) return; sof_mailbox_read(sdev, slot_offset, telemetry_data, sizeof(*telemetry_data)); @@ -39,7 +39,7 @@ void sof_ipc4_intel_dump_telemetry_state(struct snd_sof_dev *sdev, u32 flags) goto free_telemetry_data; } - block = kmalloc_obj(*block, GFP_KERNEL); + block = kmalloc_obj(*block); if (!block) goto free_telemetry_data; diff --git a/sound/soc/sof/intel/tgl.c b/sound/soc/sof/intel/tgl.c index 1c07f5882e1c..7936361e2e39 100644 --- a/sound/soc/sof/intel/tgl.c +++ b/sound/soc/sof/intel/tgl.c @@ -90,7 +90,7 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev) if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { struct sof_ipc4_fw_data *ipc4_data; - sdev->private = kzalloc_obj(*ipc4_data, GFP_KERNEL); + sdev->private = kzalloc_obj(*ipc4_data); if (!sdev->private) return -ENOMEM; diff --git a/sound/soc/sof/ipc3-dtrace.c b/sound/soc/sof/ipc3-dtrace.c index d5cb86b2ad08..22053357731a 100644 --- a/sound/soc/sof/ipc3-dtrace.c +++ b/sound/soc/sof/ipc3-dtrace.c @@ -126,7 +126,7 @@ static int trace_filter_parse(struct snd_sof_dev *sdev, char *string, capacity += TRACE_FILTER_ELEMENTS_PER_ENTRY; entry = strchr(entry + 1, entry_delimiter[0]); } - *out = kmalloc_objs(**out, capacity, GFP_KERNEL); + *out = kmalloc_objs(**out, capacity); if (!*out) return -ENOMEM; diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c index b4fc27727106..dac8e7ba5981 100644 --- a/sound/soc/sof/ipc3-topology.c +++ b/sound/soc/sof/ipc3-topology.c @@ -524,7 +524,7 @@ static int sof_ipc3_widget_setup_comp_pipeline(struct snd_sof_widget *swidget) struct snd_sof_widget *comp_swidget; int ret; - pipeline = kzalloc_obj(*pipeline, GFP_KERNEL); + pipeline = kzalloc_obj(*pipeline); if (!pipeline) return -ENOMEM; @@ -589,7 +589,7 @@ static int sof_ipc3_widget_setup_comp_buffer(struct snd_sof_widget *swidget) struct sof_ipc_buffer *buffer; int ret; - buffer = kzalloc_obj(*buffer, GFP_KERNEL); + buffer = kzalloc_obj(*buffer); if (!buffer) return -ENOMEM; @@ -893,7 +893,7 @@ static int sof_process_load(struct snd_soc_component *scomp, /* allocate struct for widget control data sizes and types */ if (widget->num_kcontrols) { - wdata = kzalloc_objs(*wdata, widget->num_kcontrols, GFP_KERNEL); + wdata = kzalloc_objs(*wdata, widget->num_kcontrols); if (!wdata) return -ENOMEM; @@ -1567,7 +1567,7 @@ static int sof_ipc3_widget_setup_comp_dai(struct snd_sof_widget *swidget) struct snd_sof_dai_link *slink; int ret; - private = kzalloc_obj(*private, GFP_KERNEL); + private = kzalloc_obj(*private); if (!private) return -ENOMEM; diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c index a21dc53e1026..f82b080de4a9 100644 --- a/sound/soc/sof/ipc4-pcm.c +++ b/sound/soc/sof/ipc4-pcm.c @@ -939,7 +939,7 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm return -ENOMEM; } - stream_priv = kzalloc_obj(*stream_priv, GFP_KERNEL); + stream_priv = kzalloc_obj(*stream_priv); if (!stream_priv) { sof_ipc4_pcm_free(sdev, spcm); return -ENOMEM; @@ -951,7 +951,7 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm if (!support_info || stream == SNDRV_PCM_STREAM_CAPTURE) continue; - time_info = kzalloc_obj(*time_info, GFP_KERNEL); + time_info = kzalloc_obj(*time_info); if (!time_info) { sof_ipc4_pcm_free(sdev, spcm); return -ENOMEM; diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 051b02b222f9..a2e9fef2760c 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -629,7 +629,7 @@ static int sof_ipc4_widget_setup_pcm(struct snd_sof_widget *swidget) int node_type = 0; int ret, dir; - ipc4_copier = kzalloc_obj(*ipc4_copier, GFP_KERNEL); + ipc4_copier = kzalloc_obj(*ipc4_copier); if (!ipc4_copier) return -ENOMEM; @@ -690,7 +690,7 @@ static int sof_ipc4_widget_setup_pcm(struct snd_sof_widget *swidget) } skip_gtw_cfg: - ipc4_copier->gtw_attr = kzalloc_obj(*ipc4_copier->gtw_attr, GFP_KERNEL); + ipc4_copier->gtw_attr = kzalloc_obj(*ipc4_copier->gtw_attr); if (!ipc4_copier->gtw_attr) { ret = -ENOMEM; goto free_available_fmt; @@ -759,7 +759,7 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget) int node_type = 0; int ret; - ipc4_copier = kzalloc_obj(*ipc4_copier, GFP_KERNEL); + ipc4_copier = kzalloc_obj(*ipc4_copier); if (!ipc4_copier) return -ENOMEM; @@ -826,7 +826,7 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget) break; } - blob = kzalloc_obj(*blob, GFP_KERNEL); + blob = kzalloc_obj(*blob); if (!blob) { ret = -ENOMEM; goto free_available_fmt; @@ -933,7 +933,7 @@ static int sof_ipc4_widget_setup_comp_pipeline(struct snd_sof_widget *swidget) struct snd_sof_pipeline *spipe = swidget->spipe; int ret; - pipeline = kzalloc_obj(*pipeline, GFP_KERNEL); + pipeline = kzalloc_obj(*pipeline); if (!pipeline) return -ENOMEM; @@ -992,7 +992,7 @@ static int sof_ipc4_widget_setup_comp_pga(struct snd_sof_widget *swidget) struct sof_ipc4_gain *gain; int ret; - gain = kzalloc_obj(*gain, GFP_KERNEL); + gain = kzalloc_obj(*gain); if (!gain) return -ENOMEM; @@ -1051,7 +1051,7 @@ static int sof_ipc4_widget_setup_comp_mixer(struct snd_sof_widget *swidget) dev_dbg(scomp->dev, "Updating IPC structure for %s\n", swidget->widget->name); - mixer = kzalloc_obj(*mixer, GFP_KERNEL); + mixer = kzalloc_obj(*mixer); if (!mixer) return -ENOMEM; @@ -1083,7 +1083,7 @@ static int sof_ipc4_widget_setup_comp_src(struct snd_sof_widget *swidget) dev_dbg(scomp->dev, "Updating IPC structure for %s\n", swidget->widget->name); - src = kzalloc_obj(*src, GFP_KERNEL); + src = kzalloc_obj(*src); if (!src) return -ENOMEM; @@ -1126,7 +1126,7 @@ static int sof_ipc4_widget_setup_comp_asrc(struct snd_sof_widget *swidget) dev_dbg(scomp->dev, "Updating IPC structure for %s\n", swidget->widget->name); - asrc = kzalloc_obj(*asrc, GFP_KERNEL); + asrc = kzalloc_obj(*asrc); if (!asrc) return -ENOMEM; @@ -1209,7 +1209,7 @@ static int sof_ipc4_widget_setup_comp_process(struct snd_sof_widget *swidget) void *cfg; int ret; - process = kzalloc_obj(*process, GFP_KERNEL); + process = kzalloc_obj(*process); if (!process) return -ENOMEM; diff --git a/sound/soc/sof/sof-client-probes-ipc4.c b/sound/soc/sof/sof-client-probes-ipc4.c index 2ab282e98a61..88397c7dc4c3 100644 --- a/sound/soc/sof/sof-client-probes-ipc4.c +++ b/sound/soc/sof/sof-client-probes-ipc4.c @@ -327,7 +327,7 @@ static int ipc4_probes_points_add(struct sof_client_dev *cdev, * performance issue I wrote the conversion explicitly open for * future development. */ - points = kzalloc_objs(*points, num_desc, GFP_KERNEL); + points = kzalloc_objs(*points, num_desc); if (!points) return -ENOMEM; diff --git a/sound/soc/sof/sof-client.c b/sound/soc/sof/sof-client.c index 6cc9b7616100..c7bbf09e547f 100644 --- a/sound/soc/sof/sof-client.c +++ b/sound/soc/sof/sof-client.c @@ -554,7 +554,7 @@ int sof_client_register_ipc_rx_handler(struct sof_client_dev *cdev, return -EINVAL; } - event = kmalloc_obj(*event, GFP_KERNEL); + event = kmalloc_obj(*event); if (!event) return -ENOMEM; @@ -608,7 +608,7 @@ int sof_client_register_fw_state_handler(struct sof_client_dev *cdev, if (!callback) return -EINVAL; - event = kmalloc_obj(*event, GFP_KERNEL); + event = kmalloc_obj(*event); if (!event) return -ENOMEM; diff --git a/sound/soc/sof/stream-ipc.c b/sound/soc/sof/stream-ipc.c index e7541e1976b8..78758cf58f01 100644 --- a/sound/soc/sof/stream-ipc.c +++ b/sound/soc/sof/stream-ipc.c @@ -99,7 +99,7 @@ EXPORT_SYMBOL(sof_set_stream_data_offset); int sof_stream_pcm_open(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream) { - struct sof_stream *stream = kmalloc_obj(*stream, GFP_KERNEL); + struct sof_stream *stream = kmalloc_obj(*stream); if (!stream) return -ENOMEM; diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 46d78de5d9da..18e2401152c8 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -973,7 +973,7 @@ static int sof_control_load(struct snd_soc_component *scomp, int index, dev_dbg(scomp->dev, "tplg: load control type %d name : %s\n", hdr->type, hdr->name); - scontrol = kzalloc_obj(*scontrol, GFP_KERNEL); + scontrol = kzalloc_obj(*scontrol); if (!scontrol) return -ENOMEM; @@ -1233,7 +1233,7 @@ static int sof_widget_parse_tokens(struct snd_soc_component *scomp, struct snd_s num_tuples += token_list[object_token_list[i]].count; /* allocate memory for tuples array */ - swidget->tuples = kzalloc_objs(*swidget->tuples, num_tuples, GFP_KERNEL); + swidget->tuples = kzalloc_objs(*swidget->tuples, num_tuples); if (!swidget->tuples) return -ENOMEM; @@ -1420,7 +1420,7 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, int token_list_size = 0; int ret = 0; - swidget = kzalloc_obj(*swidget, GFP_KERNEL); + swidget = kzalloc_obj(*swidget); if (!swidget) return -ENOMEM; @@ -1496,7 +1496,7 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, switch (w->id) { case snd_soc_dapm_dai_in: case snd_soc_dapm_dai_out: - dai = kzalloc_obj(*dai, GFP_KERNEL); + dai = kzalloc_obj(*dai); if (!dai) { ret = -ENOMEM; goto widget_free; @@ -1586,7 +1586,7 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, if (w->id == snd_soc_dapm_scheduler) { struct snd_sof_pipeline *spipe; - spipe = kzalloc_obj(*spipe, GFP_KERNEL); + spipe = kzalloc_obj(*spipe); if (!spipe) { ret = -ENOMEM; goto free; @@ -1739,7 +1739,7 @@ static int sof_dai_load(struct snd_soc_component *scomp, int index, if (!pcm) return 0; - spcm = kzalloc_obj(*spcm, GFP_KERNEL); + spcm = kzalloc_obj(*spcm); if (!spcm) return -ENOMEM; @@ -1906,7 +1906,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_ return -EINVAL; } - slink = kzalloc_obj(*slink, GFP_KERNEL); + slink = kzalloc_obj(*slink); if (!slink) return -ENOMEM; @@ -1999,7 +1999,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_ } /* allocate memory for tuples array */ - slink->tuples = kzalloc_objs(*slink->tuples, num_tuples, GFP_KERNEL); + slink->tuples = kzalloc_objs(*slink->tuples, num_tuples); if (!slink->tuples) { kfree(slink->hw_configs); kfree(slink); @@ -2094,7 +2094,7 @@ static int sof_route_load(struct snd_soc_component *scomp, int index, int ret = 0; /* allocate memory for sroute and connect */ - sroute = kzalloc_obj(*sroute, GFP_KERNEL); + sroute = kzalloc_obj(*sroute); if (!sroute) return -ENOMEM; @@ -2398,11 +2398,11 @@ static int sof_dspless_widget_ready(struct snd_soc_component *scomp, int index, struct snd_sof_widget *swidget; struct snd_sof_dai *sdai; - swidget = kzalloc_obj(*swidget, GFP_KERNEL); + swidget = kzalloc_obj(*swidget); if (!swidget) return -ENOMEM; - sdai = kzalloc_obj(*sdai, GFP_KERNEL); + sdai = kzalloc_obj(*sdai); if (!sdai) { kfree(swidget); return -ENOMEM; diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c index 0d544ff5a24f..a7d437b49fbf 100644 --- a/sound/soc/sprd/sprd-pcm-compress.c +++ b/sound/soc/sprd/sprd-pcm-compress.c @@ -160,7 +160,7 @@ static int sprd_platform_compr_dma_config(struct snd_soc_component *component, return -ENODEV; } - sgt = sg = kzalloc_objs(*sg, sg_num, GFP_KERNEL); + sgt = sg = kzalloc_objs(*sg, sg_num); if (!sg) { ret = -ENOMEM; goto sg_err; diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c index 7cfe09fdd2a0..04a4eae1bc92 100644 --- a/sound/soc/xilinx/xlnx_formatter_pcm.c +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c @@ -341,7 +341,7 @@ static int xlnx_formatter_pcm_open(struct snd_soc_component *component, !adata->s2mm_presence) return -ENODEV; - stream_data = kzalloc_obj(*stream_data, GFP_KERNEL); + stream_data = kzalloc_obj(*stream_data); if (!stream_data) return -ENOMEM; diff --git a/sound/sound_core.c b/sound/sound_core.c index 741e62cffe6e..10db8c699630 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -238,7 +238,7 @@ static DEFINE_SPINLOCK(sound_loader_lock); static int sound_insert_unit(struct sound_unit **list, const struct file_operations *fops, int index, int low, int top, const char *name, umode_t mode, struct device *dev) { - struct sound_unit *s = kmalloc_obj(*s, GFP_KERNEL); + struct sound_unit *s = kmalloc_obj(*s); int r; if (!s) diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index f690e8f812d9..c38903144c72 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -26,7 +26,7 @@ int snd_emux_new(struct snd_emux **remu) struct snd_emux *emu; *remu = NULL; - emu = kzalloc_obj(*emu, GFP_KERNEL); + emu = kzalloc_obj(*emu); if (emu == NULL) return -ENOMEM; diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index 9a279d07364d..62d1ba66721c 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -132,7 +132,7 @@ snd_emux_create_port(struct snd_emux *emu, char *name, int i, type, cap; /* Allocate structures for this channel */ - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (!p) return NULL; @@ -351,7 +351,7 @@ int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card) if (emu->midi_ports <= 0) return 0; - emu->vmidi = kzalloc_objs(*emu->vmidi, emu->midi_ports, GFP_KERNEL); + emu->vmidi = kzalloc_objs(*emu->vmidi, emu->midi_ports); if (!emu->vmidi) return -ENOMEM; diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 01996637d257..c172b53b17a4 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -230,7 +230,7 @@ newsf(struct snd_sf_list *sflist, int type, char *name) } /* not found -- create a new one */ - sf = kzalloc_obj(*sf, GFP_KERNEL); + sf = kzalloc_obj(*sf); if (sf == NULL) return NULL; sf->id = sflist->fonts_size; @@ -309,7 +309,7 @@ sf_zone_new(struct snd_sf_list *sflist, struct snd_soundfont *sf) { struct snd_sf_zone *zp; - zp = kzalloc_obj(*zp, GFP_KERNEL); + zp = kzalloc_obj(*zp); if (!zp) return NULL; zp->next = sf->zones; @@ -342,7 +342,7 @@ sf_sample_new(struct snd_sf_list *sflist, struct snd_soundfont *sf) { struct snd_sf_sample *sp; - sp = kzalloc_obj(*sp, GFP_KERNEL); + sp = kzalloc_obj(*sp); if (!sp) return NULL; @@ -1391,7 +1391,7 @@ snd_sf_new(struct snd_sf_callback *callback, struct snd_util_memhdr *hdr) { struct snd_sf_list *sflist; - sflist = kzalloc_obj(*sflist, GFP_KERNEL); + sflist = kzalloc_obj(*sflist); if (!sflist) return NULL; diff --git a/sound/synth/util_mem.c b/sound/synth/util_mem.c index 36fa4fc9632c..21893e5612fb 100644 --- a/sound/synth/util_mem.c +++ b/sound/synth/util_mem.c @@ -26,7 +26,7 @@ snd_util_memhdr_new(int memsize) { struct snd_util_memhdr *hdr; - hdr = kzalloc_obj(*hdr, GFP_KERNEL); + hdr = kzalloc_obj(*hdr); if (hdr == NULL) return NULL; hdr->size = memsize; diff --git a/sound/usb/6fire/comm.c b/sound/usb/6fire/comm.c index b7378a514e21..9a0b85653c61 100644 --- a/sound/usb/6fire/comm.c +++ b/sound/usb/6fire/comm.c @@ -141,7 +141,7 @@ static int usb6fire_comm_write16(struct comm_runtime *rt, u8 request, int usb6fire_comm_init(struct sfire_chip *chip) { - struct comm_runtime *rt = kzalloc_obj(struct comm_runtime, GFP_KERNEL); + struct comm_runtime *rt = kzalloc_obj(struct comm_runtime); struct urb *urb; int ret; diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 6707fb8a2d1e..123c1c6539b8 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c @@ -195,7 +195,7 @@ static int usb6fire_fw_ezusb_upload( u8 data; struct usb_device *device = interface_to_usbdev(intf); const struct firmware *fw = NULL; - struct ihex_record *rec = kmalloc_obj(struct ihex_record, GFP_KERNEL); + struct ihex_record *rec = kmalloc_obj(struct ihex_record); if (!rec) return -ENOMEM; diff --git a/sound/usb/6fire/midi.c b/sound/usb/6fire/midi.c index 40c935fb7592..6b0bb096f27a 100644 --- a/sound/usb/6fire/midi.c +++ b/sound/usb/6fire/midi.c @@ -140,7 +140,7 @@ static const struct snd_rawmidi_ops in_ops = { int usb6fire_midi_init(struct sfire_chip *chip) { int ret; - struct midi_runtime *rt = kzalloc_obj(struct midi_runtime, GFP_KERNEL); + struct midi_runtime *rt = kzalloc_obj(struct midi_runtime); struct comm_runtime *comm_rt = chip->comm; if (!rt) diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c index abd1338eb972..d2e274b731fe 100644 --- a/sound/usb/6fire/pcm.c +++ b/sound/usb/6fire/pcm.c @@ -587,7 +587,7 @@ int usb6fire_pcm_init(struct sfire_chip *chip) int ret; struct snd_pcm *pcm; struct pcm_runtime *rt = - kzalloc_obj(struct pcm_runtime, GFP_KERNEL); + kzalloc_obj(struct pcm_runtime); if (!rt) return -ENOMEM; diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 06837b9f8bf8..ba3f73455ebe 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c @@ -681,7 +681,7 @@ static struct urb **alloc_urbs(struct snd_usb_caiaqdev *cdev, int dir, int *ret) usb_sndisocpipe(usb_dev, ENDPOINT_PLAYBACK) : usb_rcvisocpipe(usb_dev, ENDPOINT_CAPTURE); - urbs = kmalloc_objs(*urbs, N_URBS, GFP_KERNEL); + urbs = kmalloc_objs(*urbs, N_URBS); if (!urbs) { *ret = -ENOMEM; return NULL; @@ -813,7 +813,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *cdev) NULL, 0, 0); cdev->data_cb_info = - kmalloc_objs(struct snd_usb_caiaq_cb_info, N_URBS, GFP_KERNEL); + kmalloc_objs(struct snd_usb_caiaq_cb_info, N_URBS); if (!cdev->data_cb_info) return -ENOMEM; diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 8a2bb82c1a18..73bce9712dbd 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -621,7 +621,7 @@ iface_ref_find(struct snd_usb_audio *chip, int iface) if (ip->iface == iface) return ip; - ip = kzalloc_obj(*ip, GFP_KERNEL); + ip = kzalloc_obj(*ip); if (!ip) return NULL; ip->iface = iface; @@ -639,7 +639,7 @@ clock_ref_find(struct snd_usb_audio *chip, int clock) if (ref->clock == clock) return ref; - ref = kzalloc_obj(*ref, GFP_KERNEL); + ref = kzalloc_obj(*ref); if (!ref) return NULL; ref->clock = clock; @@ -698,7 +698,7 @@ int snd_usb_add_endpoint(struct snd_usb_audio *chip, int ep_num, int type) usb_audio_dbg(chip, "Creating new %s endpoint #%x\n", ep_type_name(type), ep_num); - ep = kzalloc_obj(*ep, GFP_KERNEL); + ep = kzalloc_obj(*ep); if (!ep) return -ENOMEM; diff --git a/sound/usb/fcp.c b/sound/usb/fcp.c index 2ca41460aa5b..0fc4d063c48a 100644 --- a/sound/usb/fcp.c +++ b/sound/usb/fcp.c @@ -329,7 +329,7 @@ static int fcp_add_new_ctl(struct usb_mixer_interface *mixer, struct usb_mixer_elem_info *elem; int err; - elem = kzalloc_obj(*elem, GFP_KERNEL); + elem = kzalloc_obj(*elem); if (!elem) return -ENOMEM; @@ -654,7 +654,7 @@ static int fcp_ioctl_set_meter_map(struct usb_mixer_interface *mixer, if (!private->meter_ctl) { /* Allocate buffer for the map */ s16 *new_map __free(kfree) = - kmalloc_objs(s16, map.map_size, GFP_KERNEL); + kmalloc_objs(s16, map.map_size); if (!new_map) return -ENOMEM; @@ -1045,7 +1045,7 @@ static int fcp_init(struct usb_mixer_interface *mixer, static int fcp_init_private(struct usb_mixer_interface *mixer) { struct fcp_data *private = - kzalloc_obj(struct fcp_data, GFP_KERNEL); + kzalloc_obj(struct fcp_data); if (!private) return -ENOMEM; diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c index 2603a88a9d27..cd1a4c871c5d 100644 --- a/sound/usb/hiface/pcm.c +++ b/sound/usb/hiface/pcm.c @@ -547,7 +547,7 @@ int hiface_pcm_init(struct hiface_chip *chip, u8 extra_freq) struct snd_pcm *pcm; struct pcm_runtime *rt; - rt = kzalloc_obj(*rt, GFP_KERNEL); + rt = kzalloc_obj(*rt); if (!rt) return -ENOMEM; diff --git a/sound/usb/line6/midi.c b/sound/usb/line6/midi.c index 0e5cb8a86922..af01b649393c 100644 --- a/sound/usb/line6/midi.c +++ b/sound/usb/line6/midi.c @@ -264,7 +264,7 @@ int line6_init_midi(struct usb_line6 *line6) if (err < 0) return err; - line6midi = kzalloc_obj(struct snd_line6_midi, GFP_KERNEL); + line6midi = kzalloc_obj(struct snd_line6_midi); if (!line6midi) return -ENOMEM; diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c index ea1cea5d1105..2932eaf157f4 100644 --- a/sound/usb/line6/pcm.c +++ b/sound/usb/line6/pcm.c @@ -528,7 +528,7 @@ int line6_init_pcm(struct usb_line6 *line6, if (err < 0) return err; - line6pcm = kzalloc_obj(*line6pcm, GFP_KERNEL); + line6pcm = kzalloc_obj(*line6pcm); if (!line6pcm) return -ENOMEM; diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c index abc1a750a921..1df5c0dcd216 100644 --- a/sound/usb/line6/toneport.c +++ b/sound/usb/line6/toneport.c @@ -363,7 +363,7 @@ static int toneport_setup(struct usb_line6_toneport *toneport) struct usb_line6 *line6 = &toneport->line6; struct usb_device *usbdev = line6->usbdev; - ticks = kmalloc_obj(*ticks, GFP_KERNEL); + ticks = kmalloc_obj(*ticks); if (!ticks) return -ENOMEM; diff --git a/sound/usb/media.c b/sound/usb/media.c index 0aab1eb5c4e9..b7497d18ee3f 100644 --- a/sound/usb/media.c +++ b/sound/usb/media.c @@ -49,7 +49,7 @@ int snd_media_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm, return 0; /* allocate media_ctl */ - mctl = kzalloc_obj(*mctl, GFP_KERNEL); + mctl = kzalloc_obj(*mctl); if (!mctl) return -ENOMEM; @@ -188,7 +188,7 @@ static int snd_media_mixer_init(struct snd_usb_audio *chip) continue; /* allocate media_mixer_ctl */ - mctl = kzalloc_obj(*mctl, GFP_KERNEL); + mctl = kzalloc_obj(*mctl); if (!mctl) return -ENOMEM; diff --git a/sound/usb/midi.c b/sound/usb/midi.c index c72434ac581d..a8bddc90c0ed 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -1328,7 +1328,7 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi *umidi, int err; rep->in = NULL; - ep = kzalloc_obj(*ep, GFP_KERNEL); + ep = kzalloc_obj(*ep); if (!ep) return -ENOMEM; ep->umidi = umidi; @@ -1414,7 +1414,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi, int err; rep->out = NULL; - ep = kzalloc_obj(*ep, GFP_KERNEL); + ep = kzalloc_obj(*ep); if (!ep) return -ENOMEM; ep->umidi = umidi; @@ -2506,7 +2506,7 @@ int __snd_usbmidi_create(struct snd_card *card, int out_ports, in_ports; int i, err; - umidi = kzalloc_obj(*umidi, GFP_KERNEL); + umidi = kzalloc_obj(*umidi); if (!umidi) return -ENOMEM; umidi->dev = interface_to_usbdev(iface); diff --git a/sound/usb/midi2.c b/sound/usb/midi2.c index cf05e4cb97b1..ef602e81576d 100644 --- a/sound/usb/midi2.c +++ b/sound/usb/midi2.c @@ -432,7 +432,7 @@ static int create_midi2_endpoint(struct snd_usb_midi2_interface *umidi, hostep->desc.bEndpointAddress, ms_ep->bNumGrpTrmBlock); - ep = kzalloc_obj(*ep, GFP_KERNEL); + ep = kzalloc_obj(*ep); if (!ep) return -ENOMEM; @@ -693,7 +693,7 @@ static int create_midi2_ump(struct snd_usb_midi2_interface *umidi, char idstr[16]; int err; - rmidi = kzalloc_obj(*rmidi, GFP_KERNEL); + rmidi = kzalloc_obj(*rmidi); if (!rmidi) return -ENOMEM; INIT_LIST_HEAD(&rmidi->list); @@ -1101,7 +1101,7 @@ int snd_usb_midi_v2_create(struct snd_usb_audio *chip, hostif->desc.bInterfaceNumber, hostif->desc.bAlternateSetting); - umidi = kzalloc_obj(*umidi, GFP_KERNEL); + umidi = kzalloc_obj(*umidi); if (!umidi) return -ENOMEM; umidi->chip = chip; diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c index 62be8a00a826..49b3dd8d827d 100644 --- a/sound/usb/misc/ua101.c +++ b/sound/usb/misc/ua101.c @@ -1062,7 +1062,7 @@ static int alloc_stream_urbs(struct ua101 *ua, struct ua101_stream *stream, while (size >= max_packet_size) { if (u >= stream->queue_length) goto bufsize_error; - urb = kmalloc_obj(*urb, GFP_KERNEL); + urb = kmalloc_obj(*urb); if (!urb) return -ENOMEM; usb_init_urb(&urb->urb); diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 1b66f9581b4a..3c3b197de39d 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1684,7 +1684,7 @@ static void __build_feature_ctl(struct usb_mixer_interface *mixer, if (check_ignored_ctl(map)) return; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return; snd_usb_mixer_elem_init_std(&cval->head, mixer, unitid); @@ -1894,7 +1894,7 @@ static void build_connector_control(struct usb_mixer_interface *mixer, if (check_ignored_ctl(map)) return; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return; snd_usb_mixer_elem_init_std(&cval->head, mixer, term->id); @@ -1956,7 +1956,7 @@ static int parse_clock_source_unit(struct mixer_build *state, int unitid, UAC2_CS_CONTROL_CLOCK_VALID)) return 0; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return -ENOMEM; @@ -2177,7 +2177,7 @@ static void build_mixer_unit_ctl(struct mixer_build *state, if (check_ignored_ctl(map)) return; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return; @@ -2525,7 +2525,7 @@ static int build_audio_procunit(struct mixer_build *state, int unitid, map = find_map(state->map, unitid, valinfo->control); if (check_ignored_ctl(map)) continue; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return -ENOMEM; snd_usb_mixer_elem_init_std(&cval->head, state->mixer, unitid); @@ -2771,7 +2771,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, if (check_ignored_ctl(map)) return 0; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return -ENOMEM; snd_usb_mixer_elem_init_std(&cval->head, state->mixer, unitid); @@ -3598,7 +3598,7 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif) strscpy(chip->card->mixername, "USB Mixer"); - mixer = kzalloc_obj(*mixer, GFP_KERNEL); + mixer = kzalloc_obj(*mixer); if (!mixer) return -ENOMEM; mixer->chip = chip; diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index dc538450f3b9..9bc449ea9327 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -67,7 +67,7 @@ static int snd_create_std_mono_ctl_offset(struct usb_mixer_interface *mixer, struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return -ENOMEM; @@ -151,7 +151,7 @@ static int add_single_ctl_with_resume(struct usb_mixer_interface *mixer, struct usb_mixer_elem_list *list; struct snd_kcontrol *kctl; - list = kzalloc_obj(*list, GFP_KERNEL); + list = kzalloc_obj(*list); if (!list) return -ENOMEM; if (listp) @@ -617,7 +617,7 @@ static int snd_dualsense_ih_connect(struct input_handler *handler, struct input_handle *handle; int err; - handle = kzalloc_obj(*handle, GFP_KERNEL); + handle = kzalloc_obj(*handle); if (!handle) return -ENOMEM; @@ -714,7 +714,7 @@ static int snd_dualsense_jack_create(struct usb_mixer_interface *mixer, struct snd_kcontrol *kctl; int err; - mei = kzalloc_obj(*mei, GFP_KERNEL); + mei = kzalloc_obj(*mei); if (!mei) return -ENOMEM; @@ -2279,7 +2279,7 @@ static int realtek_add_jack(struct usb_mixer_interface *mixer, struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; - cval = kzalloc_obj(*cval, GFP_KERNEL); + cval = kzalloc_obj(*cval); if (!cval) return -ENOMEM; snd_usb_mixer_elem_init_std(&cval->head, mixer, unitid); diff --git a/sound/usb/mixer_s1810c.c b/sound/usb/mixer_s1810c.c index f931643db1c5..473cb29efa7f 100644 --- a/sound/usb/mixer_s1810c.c +++ b/sound/usb/mixer_s1810c.c @@ -534,7 +534,7 @@ snd_s1810c_switch_init(struct usb_mixer_interface *mixer, struct snd_kcontrol *kctl; struct usb_mixer_elem_info *elem; - elem = kzalloc_obj(struct usb_mixer_elem_info, GFP_KERNEL); + elem = kzalloc_obj(struct usb_mixer_elem_info); if (!elem) return -ENOMEM; @@ -645,7 +645,7 @@ int snd_sc1810_init_mixer(struct usb_mixer_interface *mixer) if (ret < 0) return ret; - private = kzalloc_obj(struct s1810_mixer_state, GFP_KERNEL); + private = kzalloc_obj(struct s1810_mixer_state); if (!private) return -ENOMEM; diff --git a/sound/usb/mixer_scarlett.c b/sound/usb/mixer_scarlett.c index 8582153cb4a7..1bb01e827654 100644 --- a/sound/usb/mixer_scarlett.c +++ b/sound/usb/mixer_scarlett.c @@ -819,7 +819,7 @@ static int add_new_ctl(struct usb_mixer_interface *mixer, struct usb_mixer_elem_info *elem; int err; - elem = kzalloc_obj(*elem, GFP_KERNEL); + elem = kzalloc_obj(*elem); if (!elem) return -ENOMEM; diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 41a496adcc09..85a0316889d4 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -3197,7 +3197,7 @@ static int scarlett2_add_new_ctl(struct usb_mixer_interface *mixer, struct usb_mixer_elem_info *elem; int err; - elem = kzalloc_obj(*elem, GFP_KERNEL); + elem = kzalloc_obj(*elem); if (!elem) return -ENOMEM; @@ -8272,7 +8272,7 @@ static int scarlett2_init_private(struct usb_mixer_interface *mixer, const struct scarlett2_device_entry *entry) { struct scarlett2_data *private = - kzalloc_obj(struct scarlett2_data, GFP_KERNEL); + kzalloc_obj(struct scarlett2_data); if (!private) return -ENOMEM; diff --git a/sound/usb/mixer_us16x08.c b/sound/usb/mixer_us16x08.c index c7b63c29cbf6..8a02964e5d7b 100644 --- a/sound/usb/mixer_us16x08.c +++ b/sound/usb/mixer_us16x08.c @@ -969,7 +969,7 @@ static struct snd_us16x08_comp_store *snd_us16x08_create_comp_store(void) int i; struct snd_us16x08_comp_store *tmp; - tmp = kmalloc_obj(*tmp, GFP_KERNEL); + tmp = kmalloc_obj(*tmp); if (!tmp) return NULL; @@ -991,7 +991,7 @@ static struct snd_us16x08_eq_store *snd_us16x08_create_eq_store(void) int i, b_idx; struct snd_us16x08_eq_store *tmp; - tmp = kmalloc_obj(*tmp, GFP_KERNEL); + tmp = kmalloc_obj(*tmp); if (!tmp) return NULL; @@ -1027,7 +1027,7 @@ static struct snd_us16x08_meter_store *snd_us16x08_create_meter_store(void) { struct snd_us16x08_meter_store *tmp; - tmp = kzalloc_obj(*tmp, GFP_KERNEL); + tmp = kzalloc_obj(*tmp); if (!tmp) return NULL; tmp->comp_index = 1; @@ -1059,7 +1059,7 @@ static int add_new_ctl(struct usb_mixer_interface *mixer, usb_audio_dbg(mixer->chip, "us16x08 add mixer %s\n", name); - elem = kzalloc_obj(*elem, GFP_KERNEL); + elem = kzalloc_obj(*elem); if (!elem) return -ENOMEM; diff --git a/sound/usb/power.c b/sound/usb/power.c index 47863b688b4d..c2d708c87fc4 100644 --- a/sound/usb/power.c +++ b/sound/usb/power.c @@ -20,7 +20,7 @@ snd_usb_find_power_domain(struct usb_host_interface *ctrl_iface, struct snd_usb_power_domain *pd; void *p; - pd = kzalloc_obj(*pd, GFP_KERNEL); + pd = kzalloc_obj(*pd); if (!pd) return NULL; diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_offload.c index b709b6cb3051..57b803e0c986 100644 --- a/sound/usb/qcom/qc_audio_offload.c +++ b/sound/usb/qcom/qc_audio_offload.c @@ -438,7 +438,7 @@ static unsigned long uaudio_get_iova(unsigned long *curr_iova, } } - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) { iova = 0; goto done; @@ -1687,7 +1687,7 @@ static struct qmi_msg_handler uaudio_stream_req_handlers = { */ static int qc_usb_audio_offload_init_qmi_dev(void) { - uaudio_qdev = kzalloc_obj(*uaudio_qdev, GFP_KERNEL); + uaudio_qdev = kzalloc_obj(*uaudio_qdev); if (!uaudio_qdev) return -ENOMEM; @@ -1759,7 +1759,7 @@ static void qc_usb_audio_offload_probe(struct snd_usb_audio *chip) guard(mutex)(&qdev_mutex); guard(mutex)(&chip->mutex); if (!uadev[chip->card->number].chip) { - sdev = kzalloc_obj(*sdev, GFP_KERNEL); + sdev = kzalloc_obj(*sdev); if (!sdev) return; @@ -1914,11 +1914,11 @@ static int qc_usb_audio_probe(struct auxiliary_device *auxdev, struct uaudio_qmi_svc *svc; int ret; - svc = kzalloc_obj(*svc, GFP_KERNEL); + svc = kzalloc_obj(*svc); if (!svc) return -ENOMEM; - svc->uaudio_svc_hdl = kzalloc_obj(*svc->uaudio_svc_hdl, GFP_KERNEL); + svc->uaudio_svc_hdl = kzalloc_obj(*svc->uaudio_svc_hdl); if (!svc->uaudio_svc_hdl) { ret = -ENOMEM; goto free_svc; diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 975b57adf2f4..4cac0dfb0094 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -566,7 +566,7 @@ static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interfac if (err < 0) dev_dbg(&dev->dev, "error sending boot message: %d\n", err); struct usb_device_descriptor *new_device_descriptor __free(kfree) = - kmalloc_obj(*new_device_descriptor, GFP_KERNEL); + kmalloc_obj(*new_device_descriptor); if (!new_device_descriptor) return -ENOMEM; err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, @@ -944,7 +944,7 @@ static int snd_usb_mbox2_boot_quirk(struct usb_device *dev) dev_dbg(&dev->dev, "device initialised!\n"); struct usb_device_descriptor *new_device_descriptor __free(kfree) = - kmalloc_obj(*new_device_descriptor, GFP_KERNEL); + kmalloc_obj(*new_device_descriptor); if (!new_device_descriptor) return -ENOMEM; @@ -1279,7 +1279,7 @@ static int snd_usb_mbox3_boot_quirk(struct usb_device *dev) dev_dbg(&dev->dev, "MBOX3: device initialised!\n"); struct usb_device_descriptor *new_device_descriptor __free(kfree) = - kmalloc_obj(*new_device_descriptor, GFP_KERNEL); + kmalloc_obj(*new_device_descriptor); if (!new_device_descriptor) return -ENOMEM; diff --git a/sound/usb/stream.c b/sound/usb/stream.c index adf1827807d4..ac4d92065dd9 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c @@ -291,7 +291,7 @@ static struct snd_pcm_chmap_elem *convert_chmap(int channels, unsigned int bits, if (channels > ARRAY_SIZE(chmap->map)) return NULL; - chmap = kzalloc_obj(*chmap, GFP_KERNEL); + chmap = kzalloc_obj(*chmap); if (!chmap) return NULL; @@ -335,7 +335,7 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor if (channels > ARRAY_SIZE(chmap->map)) return NULL; - chmap = kzalloc_obj(*chmap, GFP_KERNEL); + chmap = kzalloc_obj(*chmap); if (!chmap) return NULL; @@ -526,7 +526,7 @@ static int __snd_usb_add_audio_stream(struct snd_usb_audio *chip, } /* create a new pcm */ - as = kzalloc_obj(*as, GFP_KERNEL); + as = kzalloc_obj(*as); if (!as) return -ENOMEM; as->pcm_index = chip->pcm_devs; @@ -693,7 +693,7 @@ audio_format_alloc_init(struct snd_usb_audio *chip, struct usb_host_endpoint *ep = &alts->endpoint[0]; struct audioformat *fp; - fp = kzalloc_obj(*fp, GFP_KERNEL); + fp = kzalloc_obj(*fp); if (!fp) return NULL; @@ -927,7 +927,7 @@ snd_usb_get_audioformat_uac3(struct snd_usb_audio *chip, break; } - chmap = kzalloc_obj(*chmap, GFP_KERNEL); + chmap = kzalloc_obj(*chmap); if (!chmap) return ERR_PTR(-ENOMEM); @@ -1078,7 +1078,7 @@ found_clock: fp->rate_max = UAC3_BADD_SAMPLING_RATE; fp->rates = SNDRV_PCM_RATE_CONTINUOUS; - pd = kzalloc_obj(*pd, GFP_KERNEL); + pd = kzalloc_obj(*pd); if (!pd) { audioformat_free(fp); return NULL; diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index c8f2f07d7f8d..c913354247c7 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c @@ -663,7 +663,7 @@ static int usx2y_rate_set(struct usx2ydev *usx2y, int rate) goto cleanup; } us->len = NOOF_SETRATE_URBS; - usbdata = kmalloc_objs(int, NOOF_SETRATE_URBS, GFP_KERNEL); + usbdata = kmalloc_objs(int, NOOF_SETRATE_URBS); if (!usbdata) { err = -ENOMEM; goto cleanup; diff --git a/sound/virtio/virtio_card.c b/sound/virtio/virtio_card.c index 65abd8510ff4..647190f4d5af 100644 --- a/sound/virtio/virtio_card.c +++ b/sound/virtio/virtio_card.c @@ -137,7 +137,7 @@ static int virtsnd_find_vqs(struct virtio_snd *snd) n = virtqueue_get_vring_size(vqs[VIRTIO_SND_VQ_EVENT]); - snd->event_msgs = kmalloc_objs(*snd->event_msgs, n, GFP_KERNEL); + snd->event_msgs = kmalloc_objs(*snd->event_msgs, n); if (!snd->event_msgs) return -ENOMEM; diff --git a/sound/virtio/virtio_jack.c b/sound/virtio/virtio_jack.c index 2f1ec3ac02f0..68e40c7f5039 100644 --- a/sound/virtio/virtio_jack.c +++ b/sound/virtio/virtio_jack.c @@ -144,7 +144,7 @@ int virtsnd_jack_parse_cfg(struct virtio_snd *snd) if (!snd->jacks) return -ENOMEM; - info = kzalloc_objs(*info, snd->njacks, GFP_KERNEL); + info = kzalloc_objs(*info, snd->njacks); if (!info) return -ENOMEM; diff --git a/sound/virtio/virtio_pcm.c b/sound/virtio/virtio_pcm.c index ef5a8a507b24..eb9cc8131905 100644 --- a/sound/virtio/virtio_pcm.c +++ b/sound/virtio/virtio_pcm.c @@ -354,7 +354,7 @@ int virtsnd_pcm_parse_cfg(struct virtio_snd *snd) spin_lock_init(&vss->lock); } - info = kzalloc_objs(*info, snd->nsubstreams, GFP_KERNEL); + info = kzalloc_objs(*info, snd->nsubstreams); if (!info) return -ENOMEM; diff --git a/sound/virtio/virtio_pcm_msg.c b/sound/virtio/virtio_pcm_msg.c index 79af520ef12e..7b27f242bf5f 100644 --- a/sound/virtio/virtio_pcm_msg.c +++ b/sound/virtio/virtio_pcm_msg.c @@ -135,7 +135,7 @@ int virtsnd_pcm_msg_alloc(struct virtio_pcm_substream *vss, struct snd_pcm_runtime *runtime = vss->substream->runtime; unsigned int i; - vss->msgs = kzalloc_objs(*vss->msgs, periods, GFP_KERNEL); + vss->msgs = kzalloc_objs(*vss->msgs, periods); if (!vss->msgs) return -ENOMEM; diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index dc7501c95b99..91dfcf47e979 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -475,7 +475,7 @@ static void had_build_channel_allocation_map(struct snd_intelhad *intelhaddata) kfree(intelhaddata->chmap->chmap); intelhaddata->chmap->chmap = NULL; - chmap = kzalloc_obj(*chmap, GFP_KERNEL); + chmap = kzalloc_obj(*chmap); if (!chmap) return; |
