lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 3 Oct 2018 17:47:40 +0200
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Don.Brace@...rochip.com, don.brace@...rosemi.com,
        jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com,
        aacraid@...rosemi.com, osst@...de.org, Kai.Makisara@...umbus.fi
Cc:     esc.storagedev@...rosemi.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, osst-users@...ts.sourceforge.net
Subject: Re: [PATCH] scsi: mark expected switch fall-throughs



On 10/3/18 5:44 PM, Don.Brace@...rochip.com wrote:
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> *From:*Gustavo A. R. Silva <gustavo@...eddedor.com>
> *Sent:* Wednesday, October 3, 2018 9:55 AM
> *To:* Don Brace; James E.J. Bottomley; Martin K. Petersen; Adaptec OEM Raid Solutions; Willem Riede; Kai Mäkisara
> *Cc:* esc.storagedev@...rosemi.com; linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org; osst-users@...ts.sourceforge.net; Gustavo A. R. Silva
> *Subject:* [PATCH] scsi: mark expected switch fall-throughs
> 
>  
> 
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> ---
>  drivers/scsi/hpsa.c | 5 +++++
>  drivers/scsi/ips.c  | 1 +
>  drivers/scsi/osst.c | 6 ++++++
>  drivers/scsi/ppa.c  | 1 +
>  drivers/scsi/st.c   | 4 ++++
>  5 files changed, 17 insertions(+)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index f903983..fb6a356 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -4662,6 +4662,7 @@ static int fixup_ioaccel_cdb(u8 *cdb, int *cdb_len)
>         case WRITE_6:
>         case WRITE_12:
>                 is_write = 1;
> +               /* fall through */
>         case READ_6:
>         case READ_12:
>                 if (*cdb_len == 6) {
> @@ -5092,6 +5093,7 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
>         switch (cmd->cmnd[0]) {
>         case WRITE_6:
>                 is_write = 1;
> +               /* fall through */
>         case READ_6:
>                 first_block = (((cmd->cmnd[1] & 0x1F) << 16) |
>                                 (cmd->cmnd[2] << 8) |
> @@ -5102,6 +5104,7 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
>                 break;
>         case WRITE_10:
>                 is_write = 1;
> +               /* fall through */
>         case READ_10:
>                 first_block =
>                         (((u64) cmd->cmnd[2]) << 24) |
> @@ -5114,6 +5117,7 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
>                 break;
>         case WRITE_12:
>                 is_write = 1;
> +               /* fall through */
>         case READ_12:
>                 first_block =
>                         (((u64) cmd->cmnd[2]) << 24) |
> @@ -5128,6 +5132,7 @@ static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
>                 break;
>         case WRITE_16:
>                 is_write = 1;
> +               /* fall through */
>         case READ_16:
>                 first_block =
>                         (((u64) cmd->cmnd[2]) << 56) |
> 
>  
> 
> Tested-by: Don Brace <don.brace@...rosemi.com>
> Acked-by: Don Brace <don.brace@...rosemi.com>
> 

Thanks for this, but please don't remove the Coverity tags.

--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ