diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /sound/soc | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
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/soc')
91 files changed, 146 insertions, 146 deletions
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; |
