* [PATCH] scsi: wd33c93: Mark expected swich fall-through
@ 2019-07-29 21:03 Gustavo A. R. Silva
2019-07-29 21:48 ` Kees Cook
2019-08-08 1:38 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-29 21:03 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel, Gustavo A. R. Silva, Kees Cook
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: m68k):
drivers/scsi/wd33c93.c: In function ‘round_4’:
drivers/scsi/wd33c93.c:1856:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 2: ++x;
^~~
drivers/scsi/wd33c93.c:1857:3: note: here
case 3: ++x;
^~~~
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/scsi/wd33c93.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index fb7b289fa09f..f81046f0e68a 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -1854,6 +1854,7 @@ round_4(unsigned int x)
case 1: --x;
break;
case 2: ++x;
+ /* fall through */
case 3: ++x;
}
return x;
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: wd33c93: Mark expected swich fall-through
2019-07-29 21:03 [PATCH] scsi: wd33c93: Mark expected swich fall-through Gustavo A. R. Silva
@ 2019-07-29 21:48 ` Kees Cook
2019-08-08 1:38 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2019-07-29 21:48 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi, linux-kernel
On Mon, Jul 29, 2019 at 04:03:13PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: m68k):
>
> drivers/scsi/wd33c93.c: In function ‘round_4’:
> drivers/scsi/wd33c93.c:1856:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
> case 2: ++x;
> ^~~
> drivers/scsi/wd33c93.c:1857:3: note: here
> case 3: ++x;
> ^~~~
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> drivers/scsi/wd33c93.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
> index fb7b289fa09f..f81046f0e68a 100644
> --- a/drivers/scsi/wd33c93.c
> +++ b/drivers/scsi/wd33c93.c
> @@ -1854,6 +1854,7 @@ round_4(unsigned int x)
> case 1: --x;
> break;
> case 2: ++x;
> + /* fall through */
> case 3: ++x;
> }
> return x;
> --
> 2.22.0
>
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: wd33c93: Mark expected swich fall-through
2019-07-29 21:03 [PATCH] scsi: wd33c93: Mark expected swich fall-through Gustavo A. R. Silva
2019-07-29 21:48 ` Kees Cook
@ 2019-08-08 1:38 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-08-08 1:38 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel, Kees Cook
Gustavo,
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: m68k):
>
> drivers/scsi/wd33c93.c: In function ‘round_4’:
> drivers/scsi/wd33c93.c:1856:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
> case 2: ++x;
> ^~~
Applied to 5.4/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-08 1:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 21:03 [PATCH] scsi: wd33c93: Mark expected swich fall-through Gustavo A. R. Silva
2019-07-29 21:48 ` Kees Cook
2019-08-08 1:38 ` Martin K. Petersen
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).