* [PATCH] clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()
@ 2022-05-20 21:20 Christophe JAILLET
2022-05-21 4:32 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-05-20 21:20 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Nicolas Saenz Julienne,
Broadcom internal kernel review list
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-clk,
linux-rpi-kernel, linux-arm-kernel
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/clk/bcm/clk-raspberrypi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 9d09621549b9..73518009a0f2 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -345,7 +345,7 @@ static int raspberrypi_discover_clocks(struct raspberrypi_clk *rpi,
int ret;
clks = devm_kcalloc(rpi->dev,
- sizeof(*clks), RPI_FIRMWARE_NUM_CLK_ID,
+ RPI_FIRMWARE_NUM_CLK_ID, sizeof(*clks),
GFP_KERNEL);
if (!clks)
return -ENOMEM;
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc()
2022-05-20 21:20 [PATCH] clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc() Christophe JAILLET
@ 2022-05-21 4:32 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-05-21 4:32 UTC (permalink / raw)
To: Broadcom internal kernel review list, Christophe JAILLET,
Michael Turquette, Nicolas Saenz Julienne
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-clk,
linux-rpi-kernel, linux-arm-kernel
Quoting Christophe JAILLET (2022-05-20 14:20:58)
> 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>
> ---
Applied to clk-next
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-21 4:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-20 21:20 [PATCH] clk: bcm: rpi: Use correct order for the parameters of devm_kcalloc() Christophe JAILLET
2022-05-21 4:32 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).