diff options
author | Yu Liao <liaoyu15@huawei.com> | 2023-08-23 05:00:51 +0300 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2023-09-02 04:00:00 +0300 |
commit | 0e19543b7b0cbc47fd9cac01cd7738f14f381c70 (patch) | |
tree | 68d80e0d59f5f505564ab46298ed141bfe09c7a0 /include/rv/da_monitor.h | |
parent | 34232fcfe9a383bea802af682baae5c99f22376c (diff) | |
download | linux-0e19543b7b0cbc47fd9cac01cd7738f14f381c70.tar.xz |
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/20230823020051.3184953-1-liaoyu15@huawei.com
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307280030.7EjUG9gR-lkp@intel.com/
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'include/rv/da_monitor.h')
-rw-r--r-- | include/rv/da_monitor.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rv/da_monitor.h b/include/rv/da_monitor.h index 9eb75683e012..9705b2a98e49 100644 --- a/include/rv/da_monitor.h +++ b/include/rv/da_monitor.h @@ -262,7 +262,7 @@ static inline void da_monitor_destroy_##name(void) \ /* \ * per-cpu monitor variables \ */ \ -DEFINE_PER_CPU(struct da_monitor, da_mon_##name); \ +static DEFINE_PER_CPU(struct da_monitor, da_mon_##name); \ \ /* \ * da_get_monitor_##name - return current CPU monitor address \ |