linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: "Kai Mäkisara" <Kai.Makisara@kolumbus.fi>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: [PATCH 37/41] scsi: st: mark expected switch fall-throughs
Date: Tue, 27 Nov 2018 22:33:54 -0600	[thread overview]
Message-ID: <e0f4aa25970996146427e633bbf92be3eeee2e35.1543374820.git.gustavo@embeddedor.com> (raw)
In-Reply-To: <cover.1543374820.git.gustavo@embeddedor.com>

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114994 ("Missing break in switch")
Addresses-Coverity-ID: 114995 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/scsi/st.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 7ff22d3f03e3..7c7a742a5ef7 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -337,12 +337,14 @@ static void st_analyze_sense(struct st_request *SRpnt, struct st_cmdstatus *s)
 		switch (sense[0] & 0x7f) {
 		case 0x71:
 			s->deferred = 1;
+			/* fall through */
 		case 0x70:
 			s->fixed_format = 1;
 			s->flags = sense[2] & 0xe0;
 			break;
 		case 0x73:
 			s->deferred = 1;
+			/* fall through */
 		case 0x72:
 			s->fixed_format = 0;
 			ucp = scsi_sense_desc_find(sense, SCSI_SENSE_BUFFERSIZE, 4);
@@ -2721,6 +2723,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
 	switch (cmd_in) {
 	case MTFSFM:
 		chg_eof = 0;	/* Changed from the FSF after this */
+		/* fall through */
 	case MTFSF:
 		cmd[0] = SPACE;
 		cmd[1] = 0x01;	/* Space FileMarks */
@@ -2735,6 +2738,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
 		break;
 	case MTBSFM:
 		chg_eof = 0;	/* Changed from the FSF after this */
+		/* fall through */
 	case MTBSF:
 		cmd[0] = SPACE;
 		cmd[1] = 0x01;	/* Space FileMarks */
-- 
2.17.1


  parent reply	other threads:[~2018-11-28  4:34 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28  4:18 [PATCH 00/41] scsi: Mark " Gustavo A. R. Silva
2018-11-28  4:21 ` [PATCH 01/41] scsi: BusLogic: mark expected switch fall-through Gustavo A. R. Silva
2018-12-03 18:33   ` Khalid Aziz
2018-12-08  2:35   ` Martin K. Petersen
2018-11-28  4:24 ` [PATCH 02/41] scsi: NCR5380: Mark " Gustavo A. R. Silva
2018-11-28  8:22   ` Michael Schmitz
2018-11-28 13:47     ` Gustavo A. R. Silva
2018-11-28  4:25 ` [PATCH 03/41] scsi: aacraid: aachba: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-11-28 19:21   ` Dave.Carroll
2018-11-29  2:50   ` Martin K. Petersen
2018-11-28  4:26 ` [PATCH 04/41] scsi: aacraid: linit: Mark expected switch fall-through Gustavo A. R. Silva
2018-11-28 19:24   ` Dave.Carroll
2018-11-29  2:51   ` Martin K. Petersen
2018-11-28  4:26 ` [PATCH 05/41] scsi: aic7xxx: aic79xx: mark " Gustavo A. R. Silva
2018-12-19 15:36   ` Gustavo A. R. Silva
2019-01-10 20:15     ` Gustavo A. R. Silva
2019-01-11  7:42       ` Hannes Reinecke
2019-01-12  2:52         ` Martin K. Petersen
2018-11-28  4:26 ` [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-19 15:37   ` Gustavo A. R. Silva
2019-01-10 20:14     ` Gustavo A. R. Silva
2018-11-28  4:26 ` [PATCH 07/41] scsi: be2iscsi: be_iscsi: Mark expected switch fall-through Gustavo A. R. Silva
2018-12-19 15:37   ` Gustavo A. R. Silva
2019-01-10 20:13     ` Gustavo A. R. Silva
2018-11-28  4:27 ` [PATCH 08/41] scsi: be2iscsi: be_main: " Gustavo A. R. Silva
2018-12-19 15:38   ` Gustavo A. R. Silva
2019-01-10 20:12     ` Gustavo A. R. Silva
2018-11-28  4:27 ` [PATCH 09/41] scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-19 15:38   ` Gustavo A. R. Silva
2019-01-10 20:12     ` Gustavo A. R. Silva
2018-11-28  4:27 ` [PATCH 10/41] scsi: bfa: bfa_fcs_lport: " Gustavo A. R. Silva
2018-12-19 15:39   ` Gustavo A. R. Silva
2019-01-10 20:12     ` Gustavo A. R. Silva
2019-01-11  6:33       ` Sudarsana Reddy Kalluru
2019-01-12  2:48   ` Martin K. Petersen
2018-11-28  4:27 ` [PATCH 11/41] scsi: bfa: bfa_fcs_rport: " Gustavo A. R. Silva
2018-12-19 15:39   ` Gustavo A. R. Silva
2019-01-10 20:12     ` Gustavo A. R. Silva
2019-01-11  6:33       ` Sudarsana Reddy Kalluru
2018-11-28  4:27 ` [PATCH 12/41] scsi: bfa: bfa_ioc: " Gustavo A. R. Silva
2018-12-19 15:39   ` Gustavo A. R. Silva
2019-01-10 20:11     ` Gustavo A. R. Silva
2019-01-11  6:33       ` Sudarsana Reddy Kalluru
2018-11-28  4:28 ` [PATCH 13/41] scsi: csiostor: csio_wr: mark expected switch fall-through Gustavo A. R. Silva
2018-12-19 15:39   ` Gustavo A. R. Silva
2019-01-10 20:10     ` Gustavo A. R. Silva
2018-11-28  4:28 ` [PATCH 14/41] scsi: esas2r: esas2r_init: mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-19 15:39   ` Gustavo A. R. Silva
2019-01-10 20:08     ` Gustavo A. R. Silva
2019-01-10 22:11       ` Grove, Bradley
2019-01-12  2:45   ` Martin K. Petersen
2018-11-28  4:29 ` [PATCH 15/41] scsi: hpsa: " Gustavo A. R. Silva
2018-11-28 15:14   ` Don.Brace
2018-11-29  2:51   ` Martin K. Petersen
2018-11-28  4:29 ` [PATCH 16/41] scsi: imm: " Gustavo A. R. Silva
2018-12-19 22:26   ` Gustavo A. R. Silva
2019-01-10 20:07   ` Gustavo A. R. Silva
2018-11-28  4:29 ` [PATCH 17/41] scsi: isci: phy: Mark expected switch fall-through Gustavo A. R. Silva
2018-12-19 22:26   ` Gustavo A. R. Silva
2018-11-28  4:30 ` [PATCH 18/41] scsi: isci: remote_device: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-19 22:26   ` Gustavo A. R. Silva
2018-11-28  4:30 ` [PATCH 19/41] scsi: isci: remote_node_context: mark " Gustavo A. R. Silva
2018-12-19 22:26   ` Gustavo A. R. Silva
2018-11-28  4:30 ` [PATCH 20/41] scsi: isci: request: mark expected switch fall-through Gustavo A. R. Silva
2018-12-19 22:27   ` Gustavo A. R. Silva
2018-11-28  4:30 ` [PATCH 21/41] scsi: libfc: fc_rport: Mark " Gustavo A. R. Silva
2018-11-28  9:04   ` Johannes Thumshirn
2018-11-29  2:51   ` Martin K. Petersen
2018-11-28  4:31 ` [PATCH 22/41] scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-19 22:27   ` Gustavo A. R. Silva
2019-01-10 20:03   ` Gustavo A. R. Silva
2018-11-28  4:31 ` [PATCH 23/41] scsi: lpfc: lpfc_els: " Gustavo A. R. Silva
2018-12-19 22:27   ` Gustavo A. R. Silva
2019-01-10 20:03   ` Gustavo A. R. Silva
2018-11-28  4:31 ` [PATCH 24/41] scsi: lpfc: lpfc_hbadisc: " Gustavo A. R. Silva
2018-12-19 22:27   ` Gustavo A. R. Silva
2019-01-10 20:03   ` Gustavo A. R. Silva
2018-11-28  4:31 ` [PATCH 25/41] scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through Gustavo A. R. Silva
2018-12-19 22:27   ` Gustavo A. R. Silva
2018-11-28  4:31 ` [PATCH 26/41] scsi: lpfc: lpfc_nvme: " Gustavo A. R. Silva
2018-12-19 22:27   ` Gustavo A. R. Silva
2019-01-10 20:02   ` Gustavo A. R. Silva
2018-11-28  4:32 ` [PATCH 27/41] scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-19 22:28   ` Gustavo A. R. Silva
2019-01-10 20:01   ` Gustavo A. R. Silva
2018-11-28  4:32 ` [PATCH 28/41] scsi: lpfc: lpfc_sli: " Gustavo A. R. Silva
2018-12-19 22:28   ` Gustavo A. R. Silva
     [not found]     ` <CAGx+d6e+rCLjFEFCThgQwewod9Ni_wroV0cE_bceTXTFcsbe9A@mail.gmail.com>
2019-01-04  6:06       ` Martin K. Petersen
2018-11-28  4:32 ` [PATCH 29/41] scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through Gustavo A. R. Silva
2018-11-28  6:40   ` Sumit Saxena
2018-11-29  2:51   ` Martin K. Petersen
2018-11-28  4:32 ` [PATCH 30/41] scsi: megaraid_sas_fusion: " Gustavo A. R. Silva
2018-11-28  6:41   ` Sumit Saxena
2018-11-29  2:51   ` Martin K. Petersen
2018-11-28  4:32 ` [PATCH 31/41] scsi: mpt3sas: mpt3sas_scsih: " Gustavo A. R. Silva
2018-12-20  0:07   ` Gustavo A. R. Silva
2018-12-20  4:19     ` Suganath Prabu Subramani
2018-12-20 15:35       ` Gustavo A. R. Silva
2018-11-28  4:32 ` [PATCH 32/41] scsi: myrb: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-12-20  0:07   ` Gustavo A. R. Silva
2018-12-20  6:49     ` Hannes Reinecke
2018-12-21  0:52   ` Martin K. Petersen
2018-11-28  4:32 ` [PATCH 33/41] scsi: osd: osd_initiator: mark " Gustavo A. R. Silva
2018-12-18 17:13   ` Boaz Harrosh
2018-12-18 17:19     ` Gustavo A. R. Silva
2018-12-20  0:07   ` Gustavo A. R. Silva
2019-01-10 19:58     ` Gustavo A. R. Silva
2018-11-28  4:33 ` [PATCH 34/41] scsi: osst: " Gustavo A. R. Silva
2018-12-20  0:07   ` Gustavo A. R. Silva
2019-01-10 19:58     ` Gustavo A. R. Silva
2018-11-28  4:33 ` [PATCH 35/41] scsi: ppa: mark expected switch fall-through Gustavo A. R. Silva
2018-12-20  0:07   ` Gustavo A. R. Silva
2019-01-10 19:57     ` Gustavo A. R. Silva
2018-11-28  4:33 ` [PATCH 36/41] scsi: qla4xxx: ql4_os: " Gustavo A. R. Silva
2018-12-20  0:07   ` Gustavo A. R. Silva
2018-12-24  9:01   ` Nilesh Javali
2019-01-12  2:05     ` Martin K. Petersen
2018-11-28  4:33 ` Gustavo A. R. Silva [this message]
2018-12-20  0:08   ` [PATCH 37/41] scsi: st: mark expected switch fall-throughs Gustavo A. R. Silva
2019-01-10 19:56     ` Gustavo A. R. Silva
2018-11-28  4:34 ` [PATCH 38/41] scsi: sym53c8xx_2: sym_hipd: " Gustavo A. R. Silva
2018-12-20  0:08   ` Gustavo A. R. Silva
2019-01-10 19:55     ` Gustavo A. R. Silva
2018-11-28  4:34 ` [PATCH 39/41] scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through Gustavo A. R. Silva
2018-12-20  0:08   ` Gustavo A. R. Silva
2019-01-10 19:54     ` Gustavo A. R. Silva
2018-11-28  4:34 ` [PATCH 40/41] scsi: ufs: ufshcd: mark expected switch fall-throughs Gustavo A. R. Silva
2018-11-28  6:15   ` Avri Altman
2018-11-28  4:34 ` [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through Gustavo A. R. Silva
2018-11-28  6:03   ` Juergen Gross
2018-11-29  2:52   ` Martin K. Petersen
2018-12-18 15:23 ` [PATCH 00/41] scsi: Mark expected switch fall-throughs Gustavo A. R. Silva
     [not found]   ` <yq1mup2i3h1.fsf@oracle.com>
2018-12-19  3:53     ` Gustavo A. R. Silva
     [not found] ` <ceff1b50e91a4c13b49423b08ec9447b@fmsmsx108.amr.corp.intel.com>
2018-12-20  8:51   ` [PATCH 17/41] scsi: isci: phy: Mark expected switch fall-through Artur Paszkiewicz
2018-12-21  0:56     ` Martin K. Petersen
     [not found] ` <318fe89a188e4783b7d4cf982d365160@fmsmsx105.amr.corp.intel.com>
2018-12-20  8:51   ` [PATCH 20/41] scsi: isci: request: mark " Artur Paszkiewicz
     [not found] ` <fa4237900de64b349b3e8592de364ada@fmsmsx114.amr.corp.intel.com>
2018-12-20  8:51   ` [PATCH 19/41] scsi: isci: remote_node_context: mark expected switch fall-throughs Artur Paszkiewicz
     [not found] ` <5636e6aa6c0c42089949391b04d2529b@fmsmsx155.amr.corp.intel.com>
2018-12-20  8:51   ` [PATCH 18/41] scsi: isci: remote_device: Mark " Artur Paszkiewicz

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=e0f4aa25970996146427e633bbf92be3eeee2e35.1543374820.git.gustavo@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --subject='Re: [PATCH 37/41] scsi: st: mark expected switch fall-throughs' \
    /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

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