clocksource/drivers/loongson1: Set variable ls1x_timer_lock storage-class-specifier...
authorTom Rix <trix@redhat.com>
Sun, 2 Jul 2023 13:31:13 +0000 (09:31 -0400)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 18 Aug 2023 10:13:03 +0000 (12:13 +0200)
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
drivers/clocksource/timer-loongson1-pwm.c

index 6335fee03017b507b65482d0a310ff52e29c258a..244d6683550847cb1d12c8cf7e49dc17c07fa11d 100644 (file)
@@ -28,7 +28,7 @@
 
 #define CNTR_WIDTH             24
 
-DEFINE_RAW_SPINLOCK(ls1x_timer_lock);
+static DEFINE_RAW_SPINLOCK(ls1x_timer_lock);
 
 struct ls1x_clocksource {
        void __iomem *reg_base;