Re: [PATCH -next v2] rv/include: set variable 'da_mon_##name' to static

From: Daniel Bristot de Oliveira
Date: Fri Aug 25 2023 - 09:26:58 EST


On 8/23/23 04:00, Yu Liao wrote:
> 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.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202307280030.7EjUG9gR-lkp@xxxxxxxxx/
> Signed-off-by: Yu Liao <liaoyu15@xxxxxxxxxx>

Acked-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>

Thanks!
-- Daniel