Skip to content

Commit 7cc8f2d

Browse files
chenhuacaitsbogend
authored andcommitted
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: e9dfbaa ("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>
1 parent 9d13913 commit 7cc8f2d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/mips/kernel/perf_event_mipsxx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ static void loongson3_reset_counters(void *arg)
900900
mipspmu.write_counter(0, 0);
901901
mipsxx_pmu_write_control(0, 575<<5);
902902
mipspmu.write_counter(0, 0);
903-
fallthrough;
903+
break;
904904
}
905905
}
906906

@@ -929,7 +929,7 @@ static void reset_counters(void *arg)
929929
case 1:
930930
mipsxx_pmu_write_control(0, 0);
931931
mipspmu.write_counter(0, 0);
932-
fallthrough;
932+
break;
933933
}
934934
}
935935

0 commit comments

Comments
 (0)