From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Don.Brace@microchip.com, don.brace@microsemi.com,
jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
aacraid@microsemi.com, osst@riede.org, Kai.Makisara@kolumbus.fi
Cc: esc.storagedev@microsemi.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, osst-users@lists.sourceforge.net
Subject: Re: [PATCH] scsi: mark expected switch fall-throughs
Date: Wed, 3 Oct 2018 17:47:40 +0200 [thread overview]
Message-ID: <1bacbf96-f4d7-8ecd-106b-277d8c983663@embeddedor.com> (raw)
In-Reply-To: <BYAPR11MB2855F7449E2A15FDB28EC5B7E1E90@BYAPR11MB2855.namprd11.prod.outlook.com>
On 10/3/18 5:44 PM, Don.Brace@microchip.com wrote:
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> *From:*Gustavo A. R. Silva <gustavo@embeddedor.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@microsemi.com; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; osst-users@lists.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@embeddedor.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@microsemi.com>
> Acked-by: Don Brace <don.brace@microsemi.com>
>
Thanks for this, but please don't remove the Coverity tags.
--
Gustavo
next prev parent reply other threads:[~2018-10-03 15:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 14:55 [PATCH] scsi: mark expected switch fall-throughs Gustavo A. R. Silva
[not found] ` <BYAPR11MB2855F7449E2A15FDB28EC5B7E1E90@BYAPR11MB2855.namprd11.prod.outlook.com>
2018-10-03 15:47 ` Gustavo A. R. Silva [this message]
2018-10-11 2:47 ` Martin K. Petersen
2018-10-12 12:26 ` Gustavo A. R. Silva
2018-10-16 2:47 ` 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=1bacbf96-f4d7-8ecd-106b-277d8c983663@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=Don.Brace@microchip.com \
--cc=Kai.Makisara@kolumbus.fi \
--cc=aacraid@microsemi.com \
--cc=don.brace@microsemi.com \
--cc=esc.storagedev@microsemi.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=osst-users@lists.sourceforge.net \
--cc=osst@riede.org \
/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).