From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Finn Thain <fthain@telegraphics.com.au>,
Michael Schmitz <schmitzmic@gmail.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
scsi <linux-scsi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] scsi: sun3_scsi: Mark expected switch fall-throughs
Date: Mon, 29 Jul 2019 17:39:49 +0200 [thread overview]
Message-ID: <CAMuHMdXEU4eUEdNyY=K2B_Tj=unJV2eSJo1BQ8vDwZ-D-2wDWg@mail.gmail.com> (raw)
In-Reply-To: <20190729143007.GA8067@embeddedor>
Hi Gustavo,
On Mon, Jul 29, 2019 at 4:32 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/scsi/sun3_scsi.c: warning: this statement may fall through
> [-Wimplicit-fallthrough=]: => 399:9, 403:9
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Thanks!
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> --- a/drivers/scsi/sun3_scsi.c
> +++ b/drivers/scsi/sun3_scsi.c
> @@ -397,10 +397,12 @@ static int sun3scsi_dma_finish(int write_flag)
> case CSR_LEFT_3:
> *vaddr = (dregs->bpack_lo & 0xff00) >> 8;
> vaddr--;
> + /* Fall through */
>
> case CSR_LEFT_2:
> *vaddr = (dregs->bpack_hi & 0x00ff);
> vaddr--;
> + /* Fall through */
>
I think it would be clearer if you would drop the blank lines.
> case CSR_LEFT_1:
> *vaddr = (dregs->bpack_hi & 0xff00) >> 8;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2019-07-29 15:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 14:30 [PATCH] scsi: sun3_scsi: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-07-29 15:39 ` Geert Uytterhoeven [this message]
2019-08-08 1:35 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMuHMdXEU4eUEdNyY=K2B_Tj=unJV2eSJo1BQ8vDwZ-D-2wDWg@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=fthain@telegraphics.com.au \
--cc=gustavo@embeddedor.com \
--cc=jejb@linux.ibm.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).