* [PATCH] ARM: ep93xx: Mark expected switch fall-through
@ 2019-08-08 2:38 Gustavo A. R. Silva
2019-08-12 16:30 ` Alexander Sverdlin
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2019-08-08 2:38 UTC (permalink / raw)
To: Hartley Sweeten, Alexander Sverdlin, Russell King
Cc: linux-kernel, linux-arm-kernel, Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
Fix the following warnings (Building: arm-ep93xx_defconfig arm):
arch/arm/mach-ep93xx/crunch.c: In function 'crunch_do':
arch/arm/mach-ep93xx/crunch.c:46:3: warning: this statement may
fall through [-Wimplicit-fallthrough=]
memset(crunch_state, 0, sizeof(*crunch_state));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-ep93xx/crunch.c:53:2: note: here
case THREAD_NOTIFY_EXIT:
^~~~
Notice that, in this particular case, the code comment is
modified in accordance with what GCC is expecting to find.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
arch/arm/mach-ep93xx/crunch.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-ep93xx/crunch.c b/arch/arm/mach-ep93xx/crunch.c
index 1c9a4be8b503..1c05c5bf7e5c 100644
--- a/arch/arm/mach-ep93xx/crunch.c
+++ b/arch/arm/mach-ep93xx/crunch.c
@@ -49,6 +49,7 @@ static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t)
* FALLTHROUGH: Ensure we don't try to overwrite our newly
* initialised state information on the first fault.
*/
+ /* Fall through */
case THREAD_NOTIFY_EXIT:
crunch_task_release(thread);
--
2.22.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: ep93xx: Mark expected switch fall-through
2019-08-08 2:38 [PATCH] ARM: ep93xx: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-08-12 16:30 ` Alexander Sverdlin
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Sverdlin @ 2019-08-12 16:30 UTC (permalink / raw)
To: Gustavo A. R. Silva, Hartley Sweeten, Russell King
Cc: linux-kernel, linux-arm-kernel
Hi!
On 08/08/2019 04:38, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> Fix the following warnings (Building: arm-ep93xx_defconfig arm):
>
> arch/arm/mach-ep93xx/crunch.c: In function 'crunch_do':
> arch/arm/mach-ep93xx/crunch.c:46:3: warning: this statement may
> fall through [-Wimplicit-fallthrough=]
> memset(crunch_state, 0, sizeof(*crunch_state));
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/arm/mach-ep93xx/crunch.c:53:2: note: here
> case THREAD_NOTIFY_EXIT:
> ^~~~
>
> Notice that, in this particular case, the code comment is
> modified in accordance with what GCC is expecting to find.
>
> Reported-by: kbuild test robot <lkp@intel.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> arch/arm/mach-ep93xx/crunch.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-ep93xx/crunch.c b/arch/arm/mach-ep93xx/crunch.c
> index 1c9a4be8b503..1c05c5bf7e5c 100644
> --- a/arch/arm/mach-ep93xx/crunch.c
> +++ b/arch/arm/mach-ep93xx/crunch.c
> @@ -49,6 +49,7 @@ static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t)
> * FALLTHROUGH: Ensure we don't try to overwrite our newly
> * initialised state information on the first fault.
> */
> + /* Fall through */
>
> case THREAD_NOTIFY_EXIT:
> crunch_task_release(thread);
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-12 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-08 2:38 [PATCH] ARM: ep93xx: Mark expected switch fall-through Gustavo A. R. Silva
2019-08-12 16:30 ` Alexander Sverdlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).