[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230712162659.466996-1-colin.i.king@gmail.com>
Date: Wed, 12 Jul 2023 17:26:59 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Ben Skeggs <bskeggs@...hat.com>, Karol Herbst <kherbst@...hat.com>,
Lyude Paul <lyude@...hat.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] drm/nouveau/bios/therm: make read-only array duty_lut static const
Don't populate the read-only array on the stack, instead make it static
const.
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
index 5babc5a7c7d5..31fb20cc5a9b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
@@ -156,8 +156,10 @@ nvbios_therm_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan)
u8 ver, len, i;
u32 entry;
- uint8_t duty_lut[] = { 0, 0, 25, 0, 40, 0, 50, 0,
- 75, 0, 85, 0, 100, 0, 100, 0 };
+ static const uint8_t duty_lut[] = {
+ 0, 0, 25, 0, 40, 0, 50, 0,
+ 75, 0, 85, 0, 100, 0, 100, 0
+ };
i = 0;
fan->nr_fan_trip = 0;
--
2.39.2
Powered by blists - more mailing lists