Skip to contentSkip to conversation

c6x: traps: Mark expected switch fall-through

PATCH New Gustavo A. R. Silva 1 participant 1 message Jun 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 c6x: traps: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

Fix the following warning through the use of the new the new pseudo-keyword fallthrough;

arch/c6x/kernel/traps.c:335:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

  335 |    ie_num = 8;
      |    ~~~~~~~^~~
arch/c6x/kernel/traps.c:336:3: note: here
  336 |   default:
      |   ^~~~~~~
---
 arch/c6x/kernel/traps.c | 1 +
 1 file changed, 1 insertion(+)
arch/c6x/kernel/traps.c +1 -0
index 2b9121c755be1..bd0a477d3816d 100644
@@ -333,6 +333,7 @@ asmlinkage int process_exception(struct pt_regs *regs)
 
 		case EXCEPT_TYPE_SXF:
 			ie_num = 8;
+			fallthrough;
 		default:
 			ack_exception(type_num);
 			do_trap(&iexcept_table[ie_num], regs);
Signature · 1 line
2.27.0