Re: [PATCH] scsi: sun3_scsi: Mark expected switch fall-throughs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gustavo,

On Mon, Jul 29, 2019 at 4:32 PM Gustavo A. R. Silva
<gustavo@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>

Thanks!
Tested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

> --- 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@xxxxxxxxxxxxxx

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux