Skip to content

Commit 0e19543

Browse files
yuliao0214rostedt
authored andcommitted
rv: Set variable 'da_mon_##name' to static
gcc with W=1 reports kernel/trace/rv/monitors/wip/wip.c:20:1: sparse: sparse: symbol 'da_mon_wip' was not declared. Should it be static? The per-cpu variable 'da_mon_##name' is only used in its defining file, so it should be static. Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Yu Liao <[email protected]> Acked-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 34232fc commit 0e19543

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rv/da_monitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static inline void da_monitor_destroy_##name(void) \
262262
/* \
263263
* per-cpu monitor variables \
264264
*/ \
265-
DEFINE_PER_CPU(struct da_monitor, da_mon_##name); \
265+
static DEFINE_PER_CPU(struct da_monitor, da_mon_##name); \
266266
\
267267
/* \
268268
* da_get_monitor_##name - return current CPU monitor address \

0 commit comments

Comments
 (0)