linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] clk: moxart: Make read-only array div_idx static const
@ 2025-06-19  8:30 Colin Ian King
  2025-06-19 17:42 ` Krzysztof Kozlowski
  2025-06-19 19:53 ` Stephen Boyd
  0 siblings, 2 replies; 5+ messages in thread
From: Colin Ian King @ 2025-06-19  8:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Michael Turquette, Stephen Boyd,
	linux-arm-kernel, linux-clk
  Cc: kernel-janitors, linux-kernel

Don't populate the read-only array div_idx on the stack at run time,
instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/clk/clk-moxart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-moxart.c b/drivers/clk/clk-moxart.c
index 3786a0153ad1..4d34d1d18dbd 100644
--- a/drivers/clk/clk-moxart.c
+++ b/drivers/clk/clk-moxart.c
@@ -58,7 +58,7 @@ static void __init moxart_of_apb_clk_init(struct device_node *node)
 	struct clk_hw *hw;
 	struct clk *pll_clk;
 	unsigned int div, val;
-	unsigned int div_idx[] = { 2, 3, 4, 6, 8};
+	static const unsigned int div_idx[] = { 2, 3, 4, 6, 8};
 	const char *name = node->name;
 	const char *parent_name;
 
-- 
2.49.0


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

end of thread, other threads:[~2025-06-20  5:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-19  8:30 [PATCH][next] clk: moxart: Make read-only array div_idx static const Colin Ian King
2025-06-19 17:42 ` Krzysztof Kozlowski
2025-06-19 19:53 ` Stephen Boyd
2025-06-19 20:18   ` Krzysztof Kozlowski
2025-06-20  5:33     ` Krzysztof Kozlowski

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).