* [PATCH] powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()
@ 2021-06-01 19:02 ` trix
0 siblings, 0 replies; 3+ messages in thread
From: trix @ 2021-06-01 19:02 UTC (permalink / raw)
To: agust, mpe, benh, paulus; +Cc: linuxppc-dev, linux-kernel, Tom Rix
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()
@ 2021-06-01 19:02 ` trix
0 siblings, 0 replies; 3+ messages in thread
From: trix @ 2021-06-01 19:02 UTC (permalink / raw)
To: agust, mpe, benh, paulus; +Cc: Tom Rix, linuxppc-dev, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl()
2021-06-01 19:02 ` trix
(?)
@ 2021-06-18 3:51 ` Michael Ellerman
-1 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2021-06-18 3:51 UTC (permalink / raw)
To: paulus, trix, mpe, benh, agust; +Cc: linuxppc-dev, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-18 4:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 19:02 [PATCH] powerpc: 52xx: add fallthrough in mpc52xx_wdt_ioctl() trix
2021-06-01 19:02 ` trix
2021-06-18 3:51 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.