From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> To: cgel.zte@gmail.com, broonie@kernel.org Cc: lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, daniel.baluta@nxp.com, perex@perex.cz, tiwai@suse.com, sound-open-firmware@alsa-project.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, ye xingchen <ye.xingchen@zte.com.cn>, Zeal Robot <zealci@zte.com.cn> Subject: Re: [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc() Date: Fri, 16 Sep 2022 10:24:54 +0200 [thread overview] Message-ID: <3d95caba-7a4b-7f28-10a4-abdad75f999f@linux.intel.com> (raw) In-Reply-To: <20220916062511.153962-1-ye.xingchen@zte.com.cn> On 9/16/22 08:25, 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/sof/nocodec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c > index 356497fe4f4c..3537805070ad 100644 > --- a/sound/soc/sof/nocodec.c > +++ b/sound/soc/sof/nocodec.c > @@ -32,7 +32,7 @@ static int sof_nocodec_bes_setup(struct device *dev, > > /* set up BE dai_links */ > for (i = 0; i < link_num; i++) { > - dlc = devm_kzalloc(dev, 3 * sizeof(*dlc), GFP_KERNEL); > + dlc = devm_kcalloc(dev, 3, sizeof(*dlc), GFP_KERNEL); > if (!dlc) > return -ENOMEM; > > @@ -78,7 +78,7 @@ static int sof_nocodec_setup(struct device *dev, > struct snd_soc_dai_link *links; > > /* create dummy BE dai_links */ > - links = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link) * num_dai_drivers, GFP_KERNEL); > + links = devm_kcalloc(dev, num_dai_drivers, sizeof(struct snd_soc_dai_link), GFP_KERNEL); > if (!links) > return -ENOMEM; >
WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> To: cgel.zte@gmail.com, broonie@kernel.org Cc: alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, Zeal Robot <zealci@zte.com.cn>, tiwai@suse.com, peter.ujfalusi@linux.intel.com, lgirdwood@gmail.com, ranjani.sridharan@linux.intel.com, ye xingchen <ye.xingchen@zte.com.cn>, daniel.baluta@nxp.com, linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: Re: [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc() Date: Fri, 16 Sep 2022 10:24:54 +0200 [thread overview] Message-ID: <3d95caba-7a4b-7f28-10a4-abdad75f999f@linux.intel.com> (raw) In-Reply-To: <20220916062511.153962-1-ye.xingchen@zte.com.cn> On 9/16/22 08:25, 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/sof/nocodec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c > index 356497fe4f4c..3537805070ad 100644 > --- a/sound/soc/sof/nocodec.c > +++ b/sound/soc/sof/nocodec.c > @@ -32,7 +32,7 @@ static int sof_nocodec_bes_setup(struct device *dev, > > /* set up BE dai_links */ > for (i = 0; i < link_num; i++) { > - dlc = devm_kzalloc(dev, 3 * sizeof(*dlc), GFP_KERNEL); > + dlc = devm_kcalloc(dev, 3, sizeof(*dlc), GFP_KERNEL); > if (!dlc) > return -ENOMEM; > > @@ -78,7 +78,7 @@ static int sof_nocodec_setup(struct device *dev, > struct snd_soc_dai_link *links; > > /* create dummy BE dai_links */ > - links = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link) * num_dai_drivers, GFP_KERNEL); > + links = devm_kcalloc(dev, num_dai_drivers, sizeof(struct snd_soc_dai_link), GFP_KERNEL); > if (!links) > return -ENOMEM; >
next prev parent reply other threads:[~2022-09-16 14:24 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-16 6:25 [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc() cgel.zte 2022-09-16 6:25 ` cgel.zte 2022-09-16 8:24 ` Pierre-Louis Bossart [this message] 2022-09-16 8:24 ` Pierre-Louis Bossart 2022-09-19 23:10 ` Mark Brown 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=3d95caba-7a4b-7f28-10a4-abdad75f999f@linux.intel.com \ --to=pierre-louis.bossart@linux.intel.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=cgel.zte@gmail.com \ --cc=daniel.baluta@nxp.com \ --cc=kai.vehmanen@linux.intel.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=peter.ujfalusi@linux.intel.com \ --cc=ranjani.sridharan@linux.intel.com \ --cc=sound-open-firmware@alsa-project.org \ --cc=tiwai@suse.com \ --cc=ye.xingchen@zte.com.cn \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.