Skip to contentSkip to conversation

thermal/drivers/k3_j72xx_bandgap: make read-only const arrays static

PATCH New Colin Ian King 1 participant 1 message Jun 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal/drivers/k3_j72xx_bandgap: make read-only const arrays static

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

---
 drivers/thermal/k3_j72xx_bandgap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/k3_j72xx_bandgap.c +2 -2
index 5be1f09eeb2c..2250f3eec93b 100644
@@ -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,
Signature · 1 line
2.39.2