* [PATCH][next] drm/nouveau/bios/therm: make read-only array duty_lut static const
@ 2023-07-12 16:26 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2023-07-12 16:26 UTC (permalink / raw)
To: Ben Skeggs, Karol Herbst, Lyude Paul, David Airlie,
Daniel Vetter, dri-devel, nouveau
Cc: kernel-janitors, linux-kernel
Don't populate the read-only array on the stack, instead make it static
const.
Signed-off-by: Colin Ian King <colin.i.king@gmail.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-12 16:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12 16:26 [PATCH][next] drm/nouveau/bios/therm: make read-only array duty_lut static const Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®