Skip to content

Commit 62d9748

Browse files
ColinIanKingdlezcano
authored andcommitted
thermal/drivers/mediatek/lvts_thermal: Make read-only arrays static const
Don't populate the read-only arrays on the stack at run time, instead make them static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Nicolas Pitre <npitre@baylibre.com> Link: https://lore.kernel.org/r/20241022184622.1296044-1-colin.i.king@gmail.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 59e127d commit 62d9748

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/thermal/mediatek/lvts_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static int lvts_get_temp(struct thermal_zone_device *tz, int *temp)
329329

330330
static void lvts_update_irq_mask(struct lvts_ctrl *lvts_ctrl)
331331
{
332-
u32 masks[] = {
332+
static const u32 masks[] = {
333333
LVTS_MONINT_OFFSET_SENSOR0,
334334
LVTS_MONINT_OFFSET_SENSOR1,
335335
LVTS_MONINT_OFFSET_SENSOR2,
@@ -424,7 +424,7 @@ static irqreturn_t lvts_ctrl_irq_handler(struct lvts_ctrl *lvts_ctrl)
424424
{
425425
irqreturn_t iret = IRQ_NONE;
426426
u32 value;
427-
u32 masks[] = {
427+
static const u32 masks[] = {
428428
LVTS_INT_SENSOR0,
429429
LVTS_INT_SENSOR1,
430430
LVTS_INT_SENSOR2,

0 commit comments

Comments
 (0)