From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Don Brace" <don.brace@microsemi.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Adaptec OEM Raid Solutions" <aacraid@microsemi.com>,
"Willem Riede" <osst@riede.org>,
"Kai Mäkisara" <Kai.Makisara@kolumbus.fi>,
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: Fri, 12 Oct 2018 14:26:58 +0200 [thread overview]
Message-ID: <84512689-d898-e670-075d-509bbff20423@embeddedor.com> (raw)
In-Reply-To: <yq18t352o9l.fsf@oracle.com>
Hi Martin,
On 10/11/18 4:47 AM, Martin K. Petersen wrote:
>
> Hi Gustavo,
>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>
> I'm not entirely convinced that all these identified fall through cases
> are intentional. From a quick glance, some of them look like bugs...
>
I took a second look at this and, certainly, the one below looks more like a
bug. The rest seem to be false positives.
Also, notice that this code has been there since 2005. So, that's why I was
inclined to think that all of them are false positives.
>> diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
>> index bd6ac6b..8e1c45d 100644
>> --- a/drivers/scsi/ips.c
>> +++ b/drivers/scsi/ips.c
>> @@ -3485,6 +3485,7 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb)
>>
>> case START_STOP:
>> scb->scsi_cmd->result = DID_OK << 16;
>> + /* fall through */
If you confirm this is an actual bug, I can send a separate fix.
>>
>> case TEST_UNIT_READY:
>> case INQUIRY:
>
Thanks for the feedback.
--
Gustavo
next prev parent reply other threads:[~2018-10-12 12:26 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
2018-10-11 2:47 ` Martin K. Petersen
2018-10-12 12:26 ` Gustavo A. R. Silva [this message]
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=84512689-d898-e670-075d-509bbff20423@embeddedor.com \
--to=gustavo@embeddedor.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