Skip to contentSkip to conversation

powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()

PATCH Applied [email protected] 2 participants 2 messages Jun 1, 2021 – Jun 18, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()

From: Tom Rix <[email protected]>

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.

---
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +1 -0
index 8c0d324f657e..3823df235f25 100644
@@ -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
Signature · 1 line
2.26.3
#1 lore raw
Quoted 9 lines · On Tue, 1 Jun 2021 12:02:00 -0700, [email protected] wrote:

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:
      |  ^~~~

[...]

Applied to powerpc/next.

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

      https://git.kernel.org/powerpc/c/b629f6c0ab8668a186fda2627296d0cbcc45a368

cheers