foss-for-synopsys-dwc-arc-processors / linux

Helpful resources for users & developers of Linux kernel for ARC
22 stars 13 forks source link

perf build warning #61

Closed mischajonker closed 2 years ago

mischajonker commented 2 years ago

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.

abrodkin commented 2 years ago

Easily gets reproduced on any up-to-date kernel, just enable extra warnings with addition of W=1 on make's options, i.e. make W=1.

abrodkin commented 2 years ago

Should be fixed by http://lists.infradead.org/pipermail/linux-snps-arc/2021-November/005579.html