[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84512689-d898-e670-075d-509bbff20423@embeddedor.com>
Date: Fri, 12 Oct 2018 14:26:58 +0200
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Don Brace <don.brace@...rosemi.com>,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
Adaptec OEM Raid Solutions <aacraid@...rosemi.com>,
Willem Riede <osst@...de.org>,
Kai Mäkisara <Kai.Makisara@...umbus.fi>,
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
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
Powered by blists - more mailing lists