Thread (5 messages) flat view 5 messages, 3 authors, 2025-06-20
STALE438d

[PATCH][next] clk: moxart: Make read-only array div_idx static const

From: Colin Ian King <hidden>
Date: 2025-06-19 08:30:57
Also in: kernel-janitors, linux-clk, lkml
Subsystem: arm/moxa art soc, common clk framework, the rest · Maintainers: Krzysztof Kozlowski, Stephen Boyd, Brian Masney, Jerome Brunet, Linus Torvalds

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help