]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/52xx: Add fallthrough in mpc52xx_wdt_ioctl()
authorTom Rix <trix@redhat.com>
Tue, 1 Jun 2021 19:02:00 +0000 (12:02 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Jun 2021 07:12:05 +0000 (17:12 +1000)
With gcc 10.3, there is this compiler error:

  compiler.h:56:26: error: this statement may fall through
  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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210601190200.2637776-1-trix@redhat.com
arch/powerpc/platforms/52xx/mpc52xx_gpt.c

index 8c0d324f657e1bba975fc6ec8fcacffd456e9425..3823df235f251c1096fd47e174846ed3086c54ea 100644 (file)
@@ -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