]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: perf: Remove unnecessary "fallthrough" pseudo keywords
authorHuacai Chen <chenhc@lemote.com>
Sat, 2 May 2020 10:46:24 +0000 (18:46 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sat, 2 May 2020 11:21:09 +0000 (13:21 +0200)
commit268d7cac71b8e3f6c87b931b09272bb57f3c06fd
tree43526ce41274a5a614d1d53866be92551fd16692
parentd61739677014da8da78581969c974561c31eca0f
MIPS: perf: Remove unnecessary "fallthrough" pseudo keywords

The last branch of switch-case doesn't need a "fallthrough" pseudo
keyword, and it will cause errors when building a kernel with -Werror:

   arch/mips/kernel/perf_event_mipsxx.c: In function 'reset_counters':
   include/linux/compiler_attributes.h:200:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
     200 | # define fallthrough                    __attribute__((__fallthrough__))
         |                                         ^~~~~~~~~~~~~
>> arch/mips/kernel/perf_event_mipsxx.c:932:3: note: in expansion of macro 'fallthrough'
     932 |   fallthrough;
         |   ^~~~~~~~~~~
   arch/mips/kernel/perf_event_mipsxx.c: In function 'loongson3_reset_counters':
   include/linux/compiler_attributes.h:200:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
     200 | # define fallthrough                    __attribute__((__fallthrough__))
         |                                         ^~~~~~~~~~~~~
   arch/mips/kernel/perf_event_mipsxx.c:903:3: note: in expansion of macro 'fallthrough'
     903 |   fallthrough;
         |   ^~~~~~~~~~~
   cc1: all warnings being treated as errors

Fix it by removing unnecessary "fallthrough" pseudo keywords.

Fixes: 20a59023a508869 ("MIPS: perf: Add hardware perf events support for new Loongson-3")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/perf_event_mipsxx.c