diff mbox series

powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()

Message ID 20210601190200.2637776-1-trix@redhat.com (mailing list archive)
State Accepted
Headers show
Series powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl() | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (112f47a1484ddca610b70cbe4a99f0d0f1701daf)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Tom Rix June 1, 2021, 7:02 p.m. UTC
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(+)

Comments

Michael Ellerman June 18, 2021, 3:51 a.m. UTC | #1
On Tue, 1 Jun 2021 12:02:00 -0700, trix@redhat.com 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
diff mbox series

Patch

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