drm/nouveau/bios/therm: make read-only array duty_lut static const
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c +4 -2
@@ -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 ;
Signature · 1 line
2.39.2