From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: cgel.zte@gmail.com, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, cezary.rojewski@intel.com,
linux-kernel@vger.kernel.org, kai.vehmanen@linux.intel.com,
peter.ujfalusi@linux.intel.com, Zeal Robot <zealci@zte.com.cn>,
tiwai@suse.com, ranjani.sridharan@linux.intel.com,
liam.r.girdwood@linux.intel.com, mac.chiang@intel.com,
ye xingchen <ye.xingchen@zte.com.cn>,
ajye.huang@gmail.com, yung-chuan.liao@linux.intel.com,
brent.lu@intel.com, vamshi.krishna.gopal@intel.com,
yong.zhi@intel.com
Subject: Re: [PATCH linux-next] ASoC: Intel: sof_rt5682: use devm_kcalloc() instead of devm_kzalloc()
Date: Fri, 16 Sep 2022 10:25:52 +0200 [thread overview]
Message-ID: <5209eae6-8cf4-df16-4b9d-afc91a31db30@linux.intel.com> (raw)
In-Reply-To: <20220916062630.154277-1-ye.xingchen@zte.com.cn>
On 9/16/22 08:26, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Use 2-factor multiplication argument form devm_kcalloc() instead
> of devm_kzalloc().
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/intel/boards/sof_rt5682.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
> index 045965312245..1bf9455eaf93 100644
> --- a/sound/soc/intel/boards/sof_rt5682.c
> +++ b/sound/soc/intel/boards/sof_rt5682.c
> @@ -600,10 +600,10 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
> struct snd_soc_dai_link *links;
> int i, id = 0;
>
> - links = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link) *
> - sof_audio_card_rt5682.num_links, GFP_KERNEL);
> - cpus = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link_component) *
> - sof_audio_card_rt5682.num_links, GFP_KERNEL);
> + links = devm_kcalloc(dev, sof_audio_card_rt5682.num_links,
> + sizeof(struct snd_soc_dai_link), GFP_KERNEL);
> + cpus = devm_kcalloc(dev, sof_audio_card_rt5682.num_links,
> + sizeof(struct snd_soc_dai_link_component), GFP_KERNEL);
> if (!links || !cpus)
> goto devm_err;
>
> @@ -687,9 +687,10 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
>
> /* HDMI */
> if (hdmi_num > 0) {
> - idisp_components = devm_kzalloc(dev,
> - sizeof(struct snd_soc_dai_link_component) *
> - hdmi_num, GFP_KERNEL);
> + idisp_components = devm_kcalloc(dev,
> + hdmi_num,
> + sizeof(struct snd_soc_dai_link_component),
> + GFP_KERNEL);
> if (!idisp_components)
> goto devm_err;
> }
next prev parent reply other threads:[~2022-09-16 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 6:26 [PATCH linux-next] ASoC: Intel: sof_rt5682: use devm_kcalloc() instead of devm_kzalloc() cgel.zte
2022-09-16 8:25 ` Pierre-Louis Bossart [this message]
2022-09-19 23:10 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5209eae6-8cf4-df16-4b9d-afc91a31db30@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=ajye.huang@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=brent.lu@intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=cgel.zte@gmail.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mac.chiang@intel.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=tiwai@suse.com \
--cc=vamshi.krishna.gopal@intel.com \
--cc=ye.xingchen@zte.com.cn \
--cc=yong.zhi@intel.com \
--cc=yung-chuan.liao@linux.intel.com \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox