lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250619083035.1835133-1-colin.i.king@gmail.com>
Date: Thu, 19 Jun 2025 09:30:35 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>,
	Michael Turquette <mturquette@...libre.com>,
	Stephen Boyd <sboyd@...nel.org>,
	linux-arm-kernel@...ts.infradead.org,
	linux-clk@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH][next] clk: moxart: Make read-only array div_idx static const

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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ