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

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

 



On Sun, Jul 28, 2019 at 07:21:19PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
> 
> This patch fixes the following warnings:
> 
> drivers/scsi/cxlflash/main.c: In function 'send_afu_cmd':
> drivers/scsi/cxlflash/main.c:2347:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (rc) {
>       ^
> drivers/scsi/cxlflash/main.c:2357:2: note: here
>   case -EAGAIN:
>   ^~~~
> drivers/scsi/cxlflash/main.c: In function 'term_intr':
> drivers/scsi/cxlflash/main.c:754:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (index == PRIMARY_HWQ)
>       ^
> drivers/scsi/cxlflash/main.c:756:2: note: here
>   case UNMAP_TWO:
>   ^~~~
> drivers/scsi/cxlflash/main.c:757:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    cfg->ops->unmap_afu_irq(hwq->ctx_cookie, 2, hwq);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:758:2: note: here
>   case UNMAP_ONE:
>   ^~~~
> drivers/scsi/cxlflash/main.c:759:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    cfg->ops->unmap_afu_irq(hwq->ctx_cookie, 1, hwq);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:760:2: note: here
>   case FREE_IRQ:
>   ^~~~
> drivers/scsi/cxlflash/main.c: In function 'cxlflash_remove':
> drivers/scsi/cxlflash/main.c:975:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    cxlflash_release_chrdev(cfg);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:976:2: note: here
>   case INIT_STATE_SCSI:
>   ^~~~
> drivers/scsi/cxlflash/main.c:978:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    scsi_remove_host(cfg->host);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:979:2: note: here
>   case INIT_STATE_AFU:
>   ^~~~
> drivers/scsi/cxlflash/main.c:980:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    term_afu(cfg);
>    ^~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:981:2: note: here
>   case INIT_STATE_PCI:
>   ^~~~
> drivers/scsi/cxlflash/main.c:983:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    pci_disable_device(pdev);
>    ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/cxlflash/main.c:984:2: note: here
>   case INIT_STATE_NONE:
>   ^~~~
> drivers/scsi/cxlflash/main.c: In function 'num_hwqs_store':
> drivers/scsi/cxlflash/main.c:3018:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (cfg->state == STATE_NORMAL)
>       ^
> drivers/scsi/cxlflash/main.c:3020:2: note: here
>   default:
>   ^~~~~~~
> 
> Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>

Acked-by: Matthew R. Ochs <mrochs@xxxxxxxxxxxxx>




[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