linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "Don Brace" <don.brace@microsemi.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.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: Wed, 10 Oct 2018 22:47:02 -0400	[thread overview]
Message-ID: <yq18t352o9l.fsf@oracle.com> (raw)
In-Reply-To: <20181003145535.GA24941@embeddedor.com> (Gustavo A. R. Silva's message of "Wed, 3 Oct 2018 16:55:35 +0200")


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...

> 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 */
>  
>  		case TEST_UNIT_READY:
>  		case INQUIRY:

-- 
Martin K. Petersen	Oracle Linux Engineering

  parent reply	other threads:[~2018-10-11  2:49 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 [this message]
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=yq18t352o9l.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=aacraid@microsemi.com \
    --cc=don.brace@microsemi.com \
    --cc=esc.storagedev@microsemi.com \
    --cc=gustavo@embeddedor.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --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).