summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2020-05-02 18:46:24 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-05-02 13:21:09 +0200
commit7cc8f2d5aca162f4e2ea07e53d3123f30a7b2582 (patch)
tree43526ce41274a5a614d1d53866be92551fd16692
parent9d139131e973dac0ef6207a161b228a7fcad8180 (diff)
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: e9dfbaaeef1c9fe ("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>
-rw-r--r--arch/mips/kernel/perf_event_mipsxx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index a14974ca6d13..efce5defcc5c 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -900,7 +900,7 @@ static void loongson3_reset_counters(void *arg)
mipspmu.write_counter(0, 0);
mipsxx_pmu_write_control(0, 575<<5);
mipspmu.write_counter(0, 0);
- fallthrough;
+ break;
}
}
@@ -929,7 +929,7 @@ static void reset_counters(void *arg)
case 1:
mipsxx_pmu_write_control(0, 0);
mipspmu.write_counter(0, 0);
- fallthrough;
+ break;
}
}