All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: intel: Use correct order for the parameters of devm_kcalloc()
@ 2022-05-21  6:59 Christophe JAILLET
  2022-06-07 10:46 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-05-21  6:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-spi

We should have 'n', then 'size', not the opposite.
This is harmless because the 2 values are just multiplied, but having
the correct order silence a (unpublished yet) smatch warning.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/spi/spi-intel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-intel.c b/drivers/spi/spi-intel.c
index 50f42983b950..66063687ae27 100644
--- a/drivers/spi/spi-intel.c
+++ b/drivers/spi/spi-intel.c
@@ -1236,8 +1236,8 @@ static int intel_spi_populate_chip(struct intel_spi *ispi)
 		return -ENOMEM;
 
 	pdata->nr_parts = 1;
-	pdata->parts = devm_kcalloc(ispi->dev, sizeof(*pdata->parts),
-				    pdata->nr_parts, GFP_KERNEL);
+	pdata->parts = devm_kcalloc(ispi->dev, pdata->nr_parts,
+				    sizeof(*pdata->parts), GFP_KERNEL);
 	if (!pdata->parts)
 		return -ENOMEM;
 
-- 
2.34.1


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

* Re: [PATCH] spi: intel: Use correct order for the parameters of devm_kcalloc()
  2022-05-21  6:59 [PATCH] spi: intel: Use correct order for the parameters of devm_kcalloc() Christophe JAILLET
@ 2022-06-07 10:46 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-06-07 10:46 UTC (permalink / raw)
  To: christophe.jaillet; +Cc: kernel-janitors, linux-kernel, linux-spi

On Sat, 21 May 2022 08:59:35 +0200, Christophe JAILLET wrote:
> We should have 'n', then 'size', not the opposite.
> This is harmless because the 2 values are just multiplied, but having
> the correct order silence a (unpublished yet) smatch warning.
> 
> 

Applied to

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

Thanks!

[1/1] spi: intel: Use correct order for the parameters of devm_kcalloc()
      commit: 1f19a2d1d6b9a5796182874eecdd5a67dd94b90c

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] 2+ messages in thread

end of thread, other threads:[~2022-06-07 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-21  6:59 [PATCH] spi: intel: Use correct order for the parameters of devm_kcalloc() Christophe JAILLET
2022-06-07 10:46 ` 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.