[PATCH] arc: perf: Move static structs to where they're really used
Vineet Gupta
vgupta at kernel.org
Tue Dec 28 19:47:06 PST 2021
On 11/29/21 12:37 PM, Alexey Brodkin wrote:
> It is all well described by Stephen Rothwell who initially spotted that:
> ----------------------------->8----------------------------
> After merging the origin tree, today's linux-next build (arc
> haps_hs_smp_defconfig+kselftest) produced these warnings:
>
> arch/arc/include/asm/perf_event.h:126:27: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
> arch/arc/include/asm/perf_event.h:91:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
>
> Introduced by commit 0dd450fe13da ("ARC: Add perf support for ARC700 cores")
>
> The 2 static arrays should be moved into arch/arc/kernel/perf_event.c
> (the only place that uses them). We get the warning because perf_event.h
> is also included by arch/arc/kernel/unaligned.c.
> ----------------------------->8----------------------------
>
> Could be easily reproduced by running make with "W=1" on any up-to-date
> sources, when extra warnings get enabled (in particular
> "-Wunused-const-variable"), otherwise disabled by default in the top-level
> Makefile as "These warnings generated too much noise in a regular build".
>
> Signed-off-by: Alexey Brodkin<abrodkin at synopsys.com>
> Cc: Stephen Rothwell<sfr at canb.auug.org.au>
> Cc: Mischa Jonker<mjonker at synopsys.com>
> Cc: Vineet Gupta<vgupta at kernel.org>
Added to ARC tree.
Thx,
-Vineet
More information about the linux-snps-arc
mailing list