mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] clk: lmk04832: clkout: make read-only const arrays static
@ 2023-06-27 14:01 Colin Ian King
  2023-07-19 21:57 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-06-27 14:01 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, linux-clk; +Cc: kernel-janitors, linux-kernel

Don't populate the arrays on the stack, instead make them static.

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

diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c
index e22ac93e0c2f..21b425d8a1b7 100644
--- a/drivers/clk/clk-lmk04832.c
+++ b/drivers/clk/clk-lmk04832.c
@@ -369,7 +369,7 @@ static unsigned long lmk04832_vco_recalc_rate(struct clk_hw *hw,
 					      unsigned long prate)
 {
 	struct lmk04832 *lmk = container_of(hw, struct lmk04832, vco);
-	const unsigned int pll2_p[] = {8, 2, 2, 3, 4, 5, 6, 7};
+	static const unsigned int pll2_p[] = {8, 2, 2, 3, 4, 5, 6, 7};
 	unsigned int pll2_n, p, pll2_r;
 	unsigned int pll2_misc;
 	unsigned long vco_rate;
@@ -631,7 +631,7 @@ static int lmk04832_register_vco(struct lmk04832 *lmk)
 
 static int lmk04832_clkout_set_ddly(struct lmk04832 *lmk, int id)
 {
-	const int dclk_div_adj[] = {0, 0, -2, -2, 0, 3, -1, 0};
+	static const int dclk_div_adj[] = {0, 0, -2, -2, 0, 3, -1, 0};
 	unsigned int sclkx_y_ddly = 10;
 	unsigned int dclkx_y_ddly;
 	unsigned int dclkx_y_div;
-- 
2.39.2


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

* Re: [PATCH][next] clk: lmk04832: clkout: make read-only const arrays static
  2023-06-27 14:01 [PATCH][next] clk: lmk04832: clkout: make read-only const arrays static Colin Ian King
@ 2023-07-19 21:57 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-07-19 21:57 UTC (permalink / raw)
  To: Colin Ian King, Michael Turquette, linux-clk
  Cc: kernel-janitors, linux-kernel

Quoting Colin Ian King (2023-06-27 07:01:45)
> Don't populate the arrays on the stack, instead make them static.

What improves with this patch?

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

end of thread, other threads:[~2023-07-19 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 14:01 [PATCH][next] clk: lmk04832: clkout: make read-only const arrays static Colin Ian King
2023-07-19 21:57 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome