Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clocksource/drivers/loongson1: Set variable ls1x_timer_lock storage-class-specifier to static

smatch reports
drivers/clocksource/timer-loongson1-pwm.c:31:1: warning: symbol
'ls1x_timer_lock' was not declared. Should it be static?

This variable is only used in its defining file, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Keguang Zhang <keguang.zhang@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230702133113.3438049-1-trix@redhat.com

authored by

Tom Rix and committed by
Daniel Lezcano
bd0f3aac e7d65e40

+1 -1
+1 -1
drivers/clocksource/timer-loongson1-pwm.c
··· 28 28 29 29 #define CNTR_WIDTH 24 30 30 31 - DEFINE_RAW_SPINLOCK(ls1x_timer_lock); 31 + static DEFINE_RAW_SPINLOCK(ls1x_timer_lock); 32 32 33 33 struct ls1x_clocksource { 34 34 void __iomem *reg_base;