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>] [day] [month] [year] [list]
Date:   Tue, 27 Jun 2023 13:22:00 +0100
From:   Colin Ian King <colin.i.king@...il.com>
To:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>, linux-pm@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] thermal/drivers/k3_j72xx_bandgap: make read-only const arrays static

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

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

diff --git a/drivers/thermal/k3_j72xx_bandgap.c b/drivers/thermal/k3_j72xx_bandgap.c
index 5be1f09eeb2c..2250f3eec93b 100644
--- a/drivers/thermal/k3_j72xx_bandgap.c
+++ b/drivers/thermal/k3_j72xx_bandgap.c
@@ -357,7 +357,7 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
 	struct err_values err_vals;
 	void __iomem *fuse_base;
 
-	const s64 golden_factors[] = {
+	static const s64 golden_factors[] = {
 		-490019999999999936,
 		3251200000000000,
 		-1705800000000,
@@ -365,7 +365,7 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
 		-92627,
 	};
 
-	const s64 pvt_wa_factors[] = {
+	static const s64 pvt_wa_factors[] = {
 		-415230000000000000,
 		3126600000000000,
 		-1157800000000,
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ