Thread (2 messages) 2 messages, 2 authors, 2021-06-18

[PATCH] powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()

flat view
STALE1952d LANDED

From: trix@redhat.com
Date: 2021-06-01 19:02:10
Also in: lkml
Subsystem: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded mpc5xxx, the rest · Maintainers: Madhavan Srinivasan, Anatolij Gustschin, Linus Torvalds

Landed in mainline as b629f6c0ab86 on 2021-06-15.

From: Tom Rix <trix@redhat.com>

With gcc 10.3, there is this compiler error
compiler.h:56:26: error: this statement may
  fall through [-Werror=implicit-fallthrough=]

mpc52xx_gpt.c:586:2: note: here
  586 |  case WDIOC_GETTIMEOUT:
      |  ^~~~

So add the fallthrough pseudo keyword.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index 8c0d324f657e..3823df235f25 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -582,6 +582,7 @@ static long mpc52xx_wdt_ioctl(struct file *file, unsigned int cmd,
 		if (ret)
 			break;
 		/* fall through and return the timeout */
+		fallthrough;
 
 	case WDIOC_GETTIMEOUT:
 		/* we need to round here as to avoid e.g. the following
-- 
2.26.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help