• Huacai Chen's avatar
    MIPS: perf: Remove unnecessary "fallthrough" pseudo keywords · 7cc8f2d5
    Huacai Chen authored
    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: e9dfbaae ("MIPS: perf: Add hardware perf events support for new Loongson-3")
    Reported-by: default avatarkbuild test robot <lkp@intel.com>
    Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
    Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    7cc8f2d5
perf_event_mipsxx.c 55.1 KB