Skip to contentSkip to conversation

nios2: signal: Mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jun 8, 2020 – Jun 12, 2020 NIOS2 architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nios2: signal: 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/nios2/kernel/signal.c:254:12: warning: this statement may fall through [-Wimplicit-fallthrough=]

  254 |    restart = -2;
      |    ~~~~~~~~^~~~
arch/nios2/kernel/signal.c:255:3: note: here
  255 |   case ERESTARTNOHAND:
      |   ^~~~
---
 arch/nios2/kernel/signal.c | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/kernel/signal.c +1 -0
index a42dd09c65783..d8a087cf2b424 100644
@@ -252,6 +252,7 @@ static int do_signal(struct pt_regs *regs)
 		switch (retval) {
 		case ERESTART_RESTARTBLOCK:
 			restart = -2;
+			fallthrough;
 		case ERESTARTNOHAND:
 		case ERESTARTSYS:
 		case ERESTARTNOINTR:
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines

-----Original Message-----
From: Gustavo A. R. Silva <[email protected]>
Sent: Tuesday, June 9, 2020 1:37 AM
To: Tan, Ley Foon <[email protected]>; Christian Brauner <[email protected]>
Cc: [email protected]; Gustavo A. R. Silva <[email protected]>
Subject: [PATCH] nios2: signal: 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/nios2/kernel/signal.c:254:12: warning: this statement may fall through [-Wimplicit-fallthrough=]

  254 |    restart = -2;
      |    ~~~~~~~~^~~~
arch/nios2/kernel/signal.c:255:3: note: here
  255 |   case ERESTARTNOHAND:
      |   ^~~~
Quoted 3 lines

---

Will merge to coming release.
Thanks.

Regards
Ley Foon