All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
@ 2022-09-16  6:25 ` cgel.zte
  0 siblings, 0 replies; 6+ messages in thread
From: cgel.zte @ 2022-09-16  6:25 UTC (permalink / raw)
  To: broonie
  Cc: pierre-louis.bossart, lgirdwood, peter.ujfalusi, yung-chuan.liao,
	ranjani.sridharan, kai.vehmanen, daniel.baluta, perex, tiwai,
	sound-open-firmware, alsa-devel, linux-kernel, ye xingchen,
	Zeal Robot

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>
---
 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;
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
@ 2022-09-16  6:25 ` cgel.zte
  0 siblings, 0 replies; 6+ messages in thread
From: cgel.zte @ 2022-09-16  6:25 UTC (permalink / raw)
  To: broonie
  Cc: daniel.baluta, alsa-devel, kai.vehmanen, lgirdwood,
	peter.ujfalusi, Zeal Robot, tiwai, ranjani.sridharan,
	pierre-louis.bossart, ye xingchen, yung-chuan.liao, linux-kernel,
	sound-open-firmware

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>
---
 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;
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
  2022-09-16  6:25 ` cgel.zte
@ 2022-09-16  8:24   ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-09-16  8:24 UTC (permalink / raw)
  To: cgel.zte, broonie
  Cc: lgirdwood, peter.ujfalusi, yung-chuan.liao, ranjani.sridharan,
	kai.vehmanen, daniel.baluta, perex, tiwai, sound-open-firmware,
	alsa-devel, linux-kernel, ye xingchen, Zeal Robot



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;
>  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
@ 2022-09-16  8:24   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2022-09-16  8:24 UTC (permalink / raw)
  To: cgel.zte, broonie
  Cc: alsa-devel, kai.vehmanen, yung-chuan.liao, Zeal Robot, tiwai,
	peter.ujfalusi, lgirdwood, ranjani.sridharan, ye xingchen,
	daniel.baluta, linux-kernel, sound-open-firmware



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;
>  

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
  2022-09-16  6:25 ` cgel.zte
@ 2022-09-19 23:10   ` Mark Brown
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-09-19 23:10 UTC (permalink / raw)
  To: cgel.zte
  Cc: ranjani.sridharan, ye xingchen, linux-kernel,
	sound-open-firmware, tiwai, pierre-louis.bossart, perex,
	kai.vehmanen, Zeal Robot, alsa-devel, lgirdwood, daniel.baluta,
	yung-chuan.liao, peter.ujfalusi

On Fri, 16 Sep 2022 06:25:11 +0000, 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().
> 
> 

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
      commit: 7b88552c26971ccbc6ff35e9d544f7fac94ffef1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH linux-next] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
@ 2022-09-19 23:10   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-09-19 23:10 UTC (permalink / raw)
  To: cgel.zte
  Cc: alsa-devel, kai.vehmanen, lgirdwood, ye xingchen, Zeal Robot,
	peter.ujfalusi, tiwai, pierre-louis.bossart, yung-chuan.liao,
	ranjani.sridharan, daniel.baluta, linux-kernel,
	sound-open-firmware

On Fri, 16 Sep 2022 06:25:11 +0000, 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().
> 
> 

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc()
      commit: 7b88552c26971ccbc6ff35e9d544f7fac94ffef1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-19 23:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-09-16  8:24   ` Pierre-Louis Bossart
2022-09-19 23:10 ` Mark Brown
2022-09-19 23:10   ` Mark Brown

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.