diff mbox series

[V3,2/2] MIPS: perf: Use 'fallthrough' pseudo keyword

Message ID 1588239917-23054-2-git-send-email-chenhc@lemote.com (mailing list archive)
State Accepted
Headers show
Series [V3,1/2] MIPS: perf: Add hardware perf events support for new Loongson-3 | expand

Commit Message

Huacai Chen April 30, 2020, 9:45 a.m. UTC
Commit 294f69e662d1570703e9 ("compiler_attributes.h: Add 'fallthrough'
pseudo keyword for switch/case use") introduce a 'fallthrough' pseudo
keyword and it is the preferred format. In my previous perf patch the
checkpatch.pl script has warned me about this. But to keep consistency
I still use /* fall through */ there, and in this patch all of them in
perf_event_mipsxx.c has been updated to use the new format.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 arch/mips/kernel/perf_event_mipsxx.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index d1e8147..3abc4ac 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -852,7 +852,7 @@  static void loongson3_reset_counters(void *arg)
 		mipspmu.write_counter(3, 0);
 		mipsxx_pmu_write_control(3, 575<<5);
 		mipspmu.write_counter(3, 0);
-		/* fall through */
+		fallthrough;
 	case 3:
 		mipsxx_pmu_write_control(2, 0);
 		mipspmu.write_counter(2, 0);
@@ -868,7 +868,7 @@  static void loongson3_reset_counters(void *arg)
 		mipspmu.write_counter(2, 0);
 		mipsxx_pmu_write_control(2, 575<<5);
 		mipspmu.write_counter(2, 0);
-		/* fall through */
+		fallthrough;
 	case 2:
 		mipsxx_pmu_write_control(1, 0);
 		mipspmu.write_counter(1, 0);
@@ -884,7 +884,7 @@  static void loongson3_reset_counters(void *arg)
 		mipspmu.write_counter(1, 0);
 		mipsxx_pmu_write_control(1, 575<<5);
 		mipspmu.write_counter(1, 0);
-		/* fall through */
+		fallthrough;
 	case 1:
 		mipsxx_pmu_write_control(0, 0);
 		mipspmu.write_counter(0, 0);
@@ -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);
-		/* fall through */
+		fallthrough;
 	}
 }
 
@@ -917,19 +917,19 @@  static void reset_counters(void *arg)
 	case 4:
 		mipsxx_pmu_write_control(3, 0);
 		mipspmu.write_counter(3, 0);
-		/* fall through */
+		fallthrough;
 	case 3:
 		mipsxx_pmu_write_control(2, 0);
 		mipspmu.write_counter(2, 0);
-		/* fall through */
+		fallthrough;
 	case 2:
 		mipsxx_pmu_write_control(1, 0);
 		mipspmu.write_counter(1, 0);
-		/* fall through */
+		fallthrough;
 	case 1:
 		mipsxx_pmu_write_control(0, 0);
 		mipspmu.write_counter(0, 0);
-		/* fall through */
+		fallthrough;
 	}
 }