Skip to contentSkip to conversation

ASoC: qcom: Use devm_kcalloc() instead of devm_kzalloc()

PATCH Superseded Erick Archer 3 participants 3 messages Jan 6, 2024 – Jan 22, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: qcom: Use devm_kcalloc() instead of devm_kzalloc()

Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc().

---
 sound/soc/qcom/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/common.c +1 -1
index 756706d5b493..747041fa7866 100644
@@ -73,7 +73,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
 	link = card->dai_link;
 
 	for_each_available_child_of_node(dev->of_node, np) {
-		dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL);
+		dlc = devm_kcalloc(dev, 2, sizeof(*dlc), GFP_KERNEL);
 		if (!dlc) {
 			ret = -ENOMEM;
 			goto err_put_np;

--
2.25.1

Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Erick Archer

Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc().

Thanks!

Signature · 1 line
Gustavo
Quoted 21 lines
---
  sound/soc/qcom/common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/common.c +1 -2
index 756706d5b493..747041fa7866 100644
@@ -73,7 +73,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
  	link = card->dai_link;
 
  	for_each_available_child_of_node(dev->of_node, np) {
-		dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL);
+		dlc = devm_kcalloc(dev, 2, sizeof(*dlc), GFP_KERNEL);
  		if (!dlc) {
  			ret = -ENOMEM;
  			goto err_put_np;
--

2.25.1

maintainer
#2 lore raw
In reply to Erick Archer
Quoted 4 lines · Erick Archer

Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc().

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: qcom: Use devm_kcalloc() instead of devm_kzalloc()

      commit: 322ed3a10bf2dc85568aa9ed285aba448347080c

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