Commit 91dbd73a authored by He Zhe's avatar He Zhe Committed by Thomas Bogendoerfer

mips/oprofile: Fix fallthrough placement

We want neither
"
include/linux/compiler_attributes.h:201:41: warning: statement will never
be executed [-Wswitch-unreachable]
  201 | # define fallthrough __attribute__((__fallthrough__))
      |                      ^~~~~~~~~~~~~
"
nor
"
include/linux/compiler_attributes.h:201:41: warning: attribute
'fallthrough' not preceding a case label or default label
  201 | # define fallthrough __attribute__((__fallthrough__))
      |                      ^~~~~~~~~~~~~
"

It's not worth adding one more macro. Let's simply place the fallthrough
in between the expansions.

Fixes: c9b02990 ("MIPS: Use fallthrough for arch/mips")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent ed0ec1a8
...@@ -245,7 +245,6 @@ static int mipsxx_perfcount_handler(void) ...@@ -245,7 +245,6 @@ static int mipsxx_perfcount_handler(void)
switch (counters) { switch (counters) {
#define HANDLE_COUNTER(n) \ #define HANDLE_COUNTER(n) \
fallthrough; \
case n + 1: \ case n + 1: \
control = r_c0_perfctrl ## n(); \ control = r_c0_perfctrl ## n(); \
counter = r_c0_perfcntr ## n(); \ counter = r_c0_perfcntr ## n(); \
...@@ -256,8 +255,11 @@ static int mipsxx_perfcount_handler(void) ...@@ -256,8 +255,11 @@ static int mipsxx_perfcount_handler(void)
handled = IRQ_HANDLED; \ handled = IRQ_HANDLED; \
} }
HANDLE_COUNTER(3) HANDLE_COUNTER(3)
fallthrough;
HANDLE_COUNTER(2) HANDLE_COUNTER(2)
fallthrough;
HANDLE_COUNTER(1) HANDLE_COUNTER(1)
fallthrough;
HANDLE_COUNTER(0) HANDLE_COUNTER(0)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment