2018-11-28 04:51:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 00/41] scsi: Mark expected switch fall-throughs

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

I reviewed case by case and concluded that each of them is an
intentional fall-through. However, it doesn't hurt that the
maintainers and supporters of each driver take a look. :)

Each commit log contains the particular details for the changes in the
corresponding file.

This series fix a total of 110 of the following type of warnings in
drivers/scsi:

drivers/scsi/aic7xxx/aic7xxx_core.c:4921:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/aic7xxx/aic7xxx_core.c:4923:2: note: here
case 6:
^~~~

Thanks!

Gustavo A. R. Silva (41):
scsi: BusLogic: mark expected switch fall-through
scsi: NCR5380: Mark expected switch fall-through
scsi: aacraid: aachba: Mark expected switch fall-throughs
scsi: aacraid: linit: Mark expected switch fall-through
scsi: aic7xxx: aic79xx: mark expected switch fall-through
scsi: aic7xxx: mark expected switch fall-throughs
scsi: be2iscsi: be_iscsi: Mark expected switch fall-through
scsi: be2iscsi: be_main: Mark expected switch fall-through
scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs
scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs
scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs
scsi: bfa: bfa_ioc: Mark expected switch fall-throughs
scsi: csiostor: csio_wr: mark expected switch fall-through
scsi: esas2r: esas2r_init: mark expected switch fall-throughs
scsi: hpsa: mark expected switch fall-throughs
scsi: imm: mark expected switch fall-throughs
scsi: isci: phy: Mark expected switch fall-through
scsi: isci: remote_device: Mark expected switch fall-throughs
scsi: isci: remote_node_context: mark expected switch fall-throughs
scsi: isci: request: mark expected switch fall-through
scsi: libfc: fc_rport: Mark expected switch fall-through
scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs
scsi: lpfc: lpfc_els: Mark expected switch fall-throughs
scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs
scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through
scsi: lpfc: lpfc_nvme: Mark expected switch fall-through
scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs
scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs
scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through
scsi: megaraid_sas_fusion: Mark expected switch fall-through
scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through
scsi: myrb: Mark expected switch fall-throughs
scsi: osd: osd_initiator: mark expected switch fall-throughs
scsi: osst: mark expected switch fall-throughs
scsi: ppa: mark expected switch fall-through
scsi: qla4xxx: ql4_os: mark expected switch fall-through
scsi: st: mark expected switch fall-throughs
scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs
scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through
scsi: ufs: ufshcd: mark expected switch fall-throughs
scsi: xen-scsifront: mark expected switch fall-through

drivers/scsi/BusLogic.c | 1 +
drivers/scsi/NCR5380.c | 3 +-
drivers/scsi/aacraid/aachba.c | 5 +++-
drivers/scsi/aacraid/linit.c | 1 +
drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++----
drivers/scsi/aic7xxx/aic7xxx_core.c | 12 ++++++--
drivers/scsi/be2iscsi/be_iscsi.c | 1 +
drivers/scsi/be2iscsi/be_main.c | 1 +
drivers/scsi/bfa/bfa_fcpim.c | 6 ++--
drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++---
drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++-------
drivers/scsi/bfa/bfa_ioc.c | 9 ++----
drivers/scsi/csiostor/csio_wr.c | 1 +
drivers/scsi/esas2r/esas2r_init.c | 3 +-
drivers/scsi/hpsa.c | 5 ++++
drivers/scsi/imm.c | 33 +++++++++++----------
drivers/scsi/isci/phy.c | 1 +
drivers/scsi/isci/remote_device.c | 4 +--
drivers/scsi/isci/remote_node_context.c | 4 +--
drivers/scsi/isci/request.c | 2 +-
drivers/scsi/libfc/fc_rport.c | 1 +
drivers/scsi/lpfc/lpfc_ct.c | 2 ++
drivers/scsi/lpfc/lpfc_els.c | 1 +
drivers/scsi/lpfc/lpfc_hbadisc.c | 4 ++-
drivers/scsi/lpfc/lpfc_nportdisc.c | 1 +
drivers/scsi/lpfc/lpfc_nvme.c | 1 +
drivers/scsi/lpfc/lpfc_scsi.c | 8 ++---
drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++------
drivers/scsi/megaraid/megaraid_sas_base.c | 1 +
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
drivers/scsi/myrb.c | 3 ++
drivers/scsi/osd/osd_initiator.c | 3 +-
drivers/scsi/osst.c | 6 ++++
drivers/scsi/ppa.c | 1 +
drivers/scsi/qla4xxx/ql4_os.c | 2 +-
drivers/scsi/st.c | 4 +++
drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
drivers/scsi/ufs/ufshcd.c | 3 ++
drivers/scsi/xen-scsifront.c | 2 +-
41 files changed, 124 insertions(+), 78 deletions(-)

--
2.17.1



2018-11-28 04:31:51

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 16/41] scsi: imm: mark expected switch fall-throughs

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

Notice that, in this particular case, I placed all the "Phase N - ..."
comments on the same line as its corresponding switch case. The same
way in which similar comments appear in drivers/scsi/ppa.c. This makes
it possible to place the "fall through" annotations at the bottom of
each switch case, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/imm.c | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 8c6627bc8a39..629e0bc70d3e 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -796,21 +796,21 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
return 0;
}
return 1; /* wait until imm_wakeup claims parport */
- /* Phase 1 - Connected */
- case 1:
+
+ case 1: /* Phase 1 - Connected */
imm_connect(dev, CONNECT_EPP_MAYBE);
cmd->SCp.phase++;
+ /* fall through */

- /* Phase 2 - We are now talking to the scsi bus */
- case 2:
+ case 2: /* Phase 2 - We are now talking to the scsi bus */
if (!imm_select(dev, scmd_id(cmd))) {
imm_fail(dev, DID_NO_CONNECT);
return 0;
}
cmd->SCp.phase++;
+ /* fall through */

- /* Phase 3 - Ready to accept a command */
- case 3:
+ case 3: /* Phase 3 - Ready to accept a command */
w_ctr(ppb, 0x0c);
if (!(r_str(ppb) & 0x80))
return 1;
@@ -818,9 +818,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
if (!imm_send_command(cmd))
return 0;
cmd->SCp.phase++;
+ /* fall through */

- /* Phase 4 - Setup scatter/gather buffers */
- case 4:
+ case 4: /* Phase 4 - Setup scatter/gather buffers */
if (scsi_bufflen(cmd)) {
cmd->SCp.buffer = scsi_sglist(cmd);
cmd->SCp.this_residual = cmd->SCp.buffer->length;
@@ -834,8 +834,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
cmd->SCp.phase++;
if (cmd->SCp.this_residual & 0x01)
cmd->SCp.this_residual++;
- /* Phase 5 - Pre-Data transfer stage */
- case 5:
+ /* fall through */
+
+ case 5: /* Phase 5 - Pre-Data transfer stage */
/* Spin lock for BUSY */
w_ctr(ppb, 0x0c);
if (!(r_str(ppb) & 0x80))
@@ -850,9 +851,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
if (imm_negotiate(dev))
return 0;
cmd->SCp.phase++;
+ /* fall through */

- /* Phase 6 - Data transfer stage */
- case 6:
+ case 6: /* Phase 6 - Data transfer stage */
/* Spin lock for BUSY */
w_ctr(ppb, 0x0c);
if (!(r_str(ppb) & 0x80))
@@ -866,9 +867,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
return 1;
}
cmd->SCp.phase++;
+ /* fall through */

- /* Phase 7 - Post data transfer stage */
- case 7:
+ case 7: /* Phase 7 - Post data transfer stage */
if ((dev->dp) && (dev->rd)) {
if ((dev->mode == IMM_NIBBLE) || (dev->mode == IMM_PS2)) {
w_ctr(ppb, 0x4);
@@ -878,9 +879,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
}
}
cmd->SCp.phase++;
+ /* fall through */

- /* Phase 8 - Read status/message */
- case 8:
+ case 8: /* Phase 8 - Read status/message */
/* Check for data overrun */
if (imm_wait(dev) != (unsigned char) 0xb8) {
imm_fail(dev, DID_ERROR);
--
2.17.1


2018-11-28 04:32:29

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 21/41] scsi: libfc: fc_rport: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/libfc/fc_rport.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 638f42a5200e..9192a1d9dec6 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -1722,6 +1722,7 @@ static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp)
kref_put(&rdata->kref, fc_rport_destroy);
goto busy;
}
+ /* fall through */
default:
FC_RPORT_DBG(rdata,
"Reject ELS 0x%02x while in state %s\n",
--
2.17.1


2018-11-28 04:32:36

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 22/41] scsi: lpfc: lpfc_ct: 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 <[email protected]>
---
drivers/scsi/lpfc/lpfc_ct.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 6305ffeba7ea..b2b7fcc23654 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -3050,6 +3050,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
case SLI_MGMT_GHAT:
case SLI_MGMT_GRPL:
rsp_size = FC_MAX_NS_RSP;
+ /* fall through */
case SLI_MGMT_DHBA:
case SLI_MGMT_DHAT:
pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID;
@@ -3062,6 +3063,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
case SLI_MGMT_GPAT:
case SLI_MGMT_GPAS:
rsp_size = FC_MAX_NS_RSP;
+ /* fall through */
case SLI_MGMT_DPRT:
case SLI_MGMT_DPA:
pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID;
--
2.17.1


2018-11-28 04:32:49

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 25/41] scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/lpfc/lpfc_nportdisc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 7d5693cfaa87..e8583496feaf 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -360,6 +360,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
case NLP_STE_NPR_NODE:
if (!(ndlp->nlp_flag & NLP_NPR_ADISC))
break;
+ /* fall through */
case NLP_STE_REG_LOGIN_ISSUE:
case NLP_STE_PRLI_ISSUE:
case NLP_STE_UNMAPPED_NODE:
--
2.17.1


2018-11-28 04:33:02

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 26/41] scsi: lpfc: lpfc_nvme: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/lpfc/lpfc_nvme.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index ba831def9301..942fe58c433d 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -1115,6 +1115,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
lpfc_ncmd, nCmd,
lpfc_ncmd->cur_iocbq.sli4_xritag,
bf_get(lpfc_wcqe_c_xb, wcqe));
+ /* fall through */
default:
out_err:
lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
--
2.17.1


2018-11-28 04:34:03

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 33/41] scsi: osd: osd_initiator: 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 <[email protected]>
---
drivers/scsi/osd/osd_initiator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index 60cf7c5eb880..cb26f26d5ec1 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -1849,6 +1849,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
32, 1, dump, sizeof(dump), true);
OSD_SENSE_PRINT2("response_integrity [%s]\n", dump);
}
+ /* fall through */
case osd_sense_attribute_identification:
{
struct osd_sense_attributes_data_descriptor
@@ -1879,7 +1880,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
attr_page, attr_id);
}
}
- /*These are not legal for OSD*/
+ /* fall through - These are not legal for OSD */
case scsi_sense_field_replaceable_unit:
OSD_SENSE_PRINT2("scsi_sense_field_replaceable_unit\n");
break;
--
2.17.1


2018-11-28 04:34:49

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 37/41] scsi: st: mark expected switch fall-throughs

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 <[email protected]>
---
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


2018-11-28 04:35:02

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 27/41] scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs

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

Notice that, in this particular case, I replaced "Drop thru" with
"fall through" annotations, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index baed2b891efb..0eeed6c4c2ee 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -1427,7 +1427,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,

break;
}
- /* Drop thru */
+ /* fall through */
case SCSI_PROT_WRITE_INSERT:
/*
* For WRITE_INSERT, force the error
@@ -1546,7 +1546,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
rc = BG_ERR_TGT | BG_ERR_CHECK;
break;
}
- /* Drop thru */
+ /* fall through */
case SCSI_PROT_WRITE_INSERT:
/*
* For WRITE_INSERT, force the
@@ -1628,7 +1628,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
switch (op) {
case SCSI_PROT_WRITE_PASS:
rc = BG_ERR_CHECK;
- /* Drop thru */
+ /* fall through */

case SCSI_PROT_WRITE_INSERT:
/*
@@ -4115,7 +4115,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
lpfc_cmd->cur_iocbq.sli4_lxritag,
0, 0);
}
- /* else: fall through */
+ /* fall through */
default:
cmd->result = DID_ERROR << 16;
break;
--
2.17.1


2018-11-28 04:35:25

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 39/41] scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/sym53c8xx_2/sym_nvram.c b/drivers/scsi/sym53c8xx_2/sym_nvram.c
index 5662fbb3ff60..0d37b4f07b5e 100644
--- a/drivers/scsi/sym53c8xx_2/sym_nvram.c
+++ b/drivers/scsi/sym53c8xx_2/sym_nvram.c
@@ -708,6 +708,7 @@ static int sym_read_Tekram_nvram (struct sym_device *np, Tekram_nvram *nvram)
data, len);
if (!x)
break;
+ /* fall through */
default:
x = sym_read_T93C46_nvram(np, nvram);
break;
--
2.17.1


2018-11-28 04:36:58

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 40/41] scsi: ufs: ufshcd: mark expected switch fall-throughs

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

Addresses-Coverity-ID: 1087954 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/ufs/ufshcd.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 003d489f1b4b..be207197b63f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1551,6 +1551,7 @@ int ufshcd_hold(struct ufs_hba *hba, bool async)
* currently running. Hence, fall through to cancel gating
* work and to enable clocks.
*/
+ /* fall through */
case CLKS_OFF:
ufshcd_scsi_block_requests(hba);
hba->clk_gating.state = REQ_CLKS_ON;
@@ -1562,6 +1563,7 @@ int ufshcd_hold(struct ufs_hba *hba, bool async)
* fall through to check if we should wait for this
* work to be done or not.
*/
+ /* fall through */
case REQ_CLKS_ON:
if (async) {
rc = -EAGAIN;
@@ -4620,6 +4622,7 @@ ufshcd_scsi_cmd_status(struct ufshcd_lrb *lrbp, int scsi_status)
switch (scsi_status) {
case SAM_STAT_CHECK_CONDITION:
ufshcd_copy_sense_data(lrbp);
+ /* fall through */
case SAM_STAT_GOOD:
result |= DID_OK << 16 |
COMMAND_COMPLETE << 8 |
--
2.17.1


2018-11-28 04:37:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through

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

Notice that, in this particular case, I replaced
"Missed the backend's Closing state -- fallthrough" with
"fall through - Missed the backend's Closing state", which
contains the "fall through" annotation at the beginnig of
the code comment, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/xen-scsifront.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 61389bdc7926..bb76d0d2022b 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -1112,7 +1112,7 @@ static void scsifront_backend_changed(struct xenbus_device *dev,
case XenbusStateClosed:
if (dev->state == XenbusStateClosed)
break;
- /* Missed the backend's Closing state -- fallthrough */
+ /* fall through - Missed the backend's Closing state */
case XenbusStateClosing:
scsifront_disconnect(info);
break;
--
2.17.1


2018-11-28 04:47:00

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 03/41] scsi: aacraid: aachba: Mark expected switch fall-throughs

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

Also, a break statement is properly aligned.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/aacraid/aachba.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index bd7f352c28f3..75ab5ff6b78c 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -2892,6 +2892,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
!(dev->raw_io_64) ||
((scsicmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
break;
+ /* fall through */
case INQUIRY:
case READ_CAPACITY:
case TEST_UNIT_READY:
@@ -2966,6 +2967,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
/* Issue FIB to tell Firmware to flush it's cache */
if ((aac_cache & 6) != 2)
return aac_synchronize(scsicmd);
+ /* fall through */
case INQUIRY:
{
struct inquiry_data inq_data;
@@ -3319,8 +3321,9 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
min_t(size_t,
sizeof(dev->fsa_dev[cid].sense_data),
SCSI_SENSE_BUFFERSIZE));
- break;
+ break;
}
+ /* fall through */
case RESERVE:
case RELEASE:
case REZERO_UNIT:
--
2.17.1


2018-11-28 04:47:37

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 01/41] scsi: BusLogic: mark expected switch fall-through

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

Addresses-Coverity-ID: 1056537 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/BusLogic.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index 9cee941f97d6..717eef3ee893 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -2641,6 +2641,7 @@ static int blogic_resultcode(struct blogic_adapter *adapter,
case BLOGIC_BAD_CMD_PARAM:
blogic_warn("BusLogic Driver Protocol Error 0x%02X\n",
adapter, adapter_status);
+ /* fall through */
case BLOGIC_DATA_UNDERRUN:
case BLOGIC_DATA_OVERRUN:
case BLOGIC_NOEXPECT_BUSFREE:
--
2.17.1


2018-11-28 04:49:00

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 02/41] scsi: NCR5380: Mark expected switch fall-through

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

Notice that in this particular case, I replaced "Fall through to reject message"
with a "fall through" annotation at the bottom of the case, which is what GCC
is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/NCR5380.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 01c23d27f290..12073e52a0eb 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -1933,12 +1933,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
if (!hostdata->connected)
return;

- /* Fall through to reject message */
-
/*
* If we get something weird that we aren't expecting,
* reject it.
*/
+ /* fall through */
default:
if (tmp == EXTENDED_MESSAGE)
scmd_printk(KERN_INFO, cmd,
--
2.17.1


2018-11-28 04:50:47

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 04/41] scsi: aacraid: linit: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/aacraid/linit.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 2d4e4ddc5ace..42defee90eb2 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -759,6 +759,7 @@ static int aac_eh_abort(struct scsi_cmnd* cmd)
!(aac->raw_io_64) ||
((cmd->cmnd[1] & 0x1f) != SAI_READ_CAPACITY_16))
break;
+ /* fall through */
case INQUIRY:
case READ_CAPACITY:
/*
--
2.17.1


2018-11-28 04:51:44

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 11/41] scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs

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

Notice that I replaced "!! fall through !!" and "!!! fall through !!!"
comments with "fall through" annotations, which is what GCC is
expecting to find.

Addresses-Coverity-ID: 744899 ("Missing break in switch")
Addresses-Coverity-ID: 744900 ("Missing break in switch")
Addresses-Coverity-ID: 744901 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
index de50349a39ce..1e400f2aaece 100644
--- a/drivers/scsi/bfa/bfa_fcs_rport.c
+++ b/drivers/scsi/bfa/bfa_fcs_rport.c
@@ -427,17 +427,13 @@ bfa_fcs_rport_sm_plogi(struct bfa_fcs_rport_s *rport, enum rport_event event)

case RPSM_EVENT_LOGO_RCVD:
bfa_fcs_rport_send_logo_acc(rport);
- /*
- * !! fall through !!
- */
+ /* fall through */
case RPSM_EVENT_PRLO_RCVD:
if (rport->prlo == BFA_TRUE)
bfa_fcs_rport_send_prlo_acc(rport);

bfa_fcxp_discard(rport->fcxp);
- /*
- * !! fall through !!
- */
+ /* fall through */
case RPSM_EVENT_FAILED:
if (rport->plogi_retries < BFA_FCS_RPORT_MAX_RETRIES) {
rport->plogi_retries++;
@@ -868,9 +864,7 @@ bfa_fcs_rport_sm_adisc_online(struct bfa_fcs_rport_s *rport,
* At least go offline when a PLOGI is received.
*/
bfa_fcxp_discard(rport->fcxp);
- /*
- * !!! fall through !!!
- */
+ /* fall through */

case RPSM_EVENT_FAILED:
case RPSM_EVENT_ADDRESS_CHANGE:
@@ -1056,6 +1050,7 @@ bfa_fcs_rport_sm_fc4_logosend(struct bfa_fcs_rport_s *rport,

case RPSM_EVENT_LOGO_RCVD:
bfa_fcs_rport_send_logo_acc(rport);
+ /* fall through */
case RPSM_EVENT_PRLO_RCVD:
if (rport->prlo == BFA_TRUE)
bfa_fcs_rport_send_prlo_acc(rport);
@@ -1144,9 +1139,7 @@ bfa_fcs_rport_sm_hcb_offline(struct bfa_fcs_rport_s *rport,
bfa_fcs_rport_send_plogiacc(rport, NULL);
break;
}
- /*
- * !! fall through !!
- */
+ /* fall through */

case RPSM_EVENT_ADDRESS_CHANGE:
if (!bfa_fcs_lport_is_online(rport->port)) {
@@ -1303,6 +1296,7 @@ bfa_fcs_rport_sm_hcb_logosend(struct bfa_fcs_rport_s *rport,

case RPSM_EVENT_LOGO_RCVD:
bfa_fcs_rport_send_logo_acc(rport);
+ /* fall through */
case RPSM_EVENT_PRLO_RCVD:
if (rport->prlo == BFA_TRUE)
bfa_fcs_rport_send_prlo_acc(rport);
@@ -1346,6 +1340,7 @@ bfa_fcs_rport_sm_logo_sending(struct bfa_fcs_rport_s *rport,

case RPSM_EVENT_LOGO_RCVD:
bfa_fcs_rport_send_logo_acc(rport);
+ /* fall through */
case RPSM_EVENT_PRLO_RCVD:
if (rport->prlo == BFA_TRUE)
bfa_fcs_rport_send_prlo_acc(rport);
--
2.17.1


2018-11-28 04:52:02

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 15/41] scsi: hpsa: mark expected switch fall-throughs

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

Addresses-Coverity-ID: 1195463 ("Missing break in switch")
Addresses-Coverity-ID: 1195464 ("Missing break in switch")
Addresses-Coverity-ID: 1195465 ("Missing break in switch")
Addresses-Coverity-ID: 1195466 ("Missing break in switch")
Addresses-Coverity-ID: 1357338 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/hpsa.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index c9cccf35e9d7..bc64e8a0449d 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4663,6 +4663,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) {
@@ -5093,6 +5094,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) |
@@ -5103,6 +5105,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) |
@@ -5115,6 +5118,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) |
@@ -5129,6 +5133,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) |
--
2.17.1


2018-11-28 04:52:11

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 08/41] scsi: be2iscsi: be_main: Mark expected switch fall-through

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

Addresses-Coverity-ID: 1357387 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/be2iscsi/be_main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index effb6fc95af4..b6449da1320c 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -1539,6 +1539,7 @@ beiscsi_hdl_get_handle(struct beiscsi_conn *beiscsi_conn,
break;
case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
error = 1;
+ /* fall through */
case UNSOL_DATA_NOTIFY:
pasync_handle = pasync_ctx->async_entry[ci].data;
break;
--
2.17.1


2018-11-28 04:52:36

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 09/41] scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs

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

Notice that I replaced "Fall through !!!" with a "fall through"
annotation, which is what GCC is expecting to find.

Addresses-Coverity-ID: 114971 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/bfa/bfa_fcpim.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
index 2c85f5b1f9c1..7e996bcf026c 100644
--- a/drivers/scsi/bfa/bfa_fcpim.c
+++ b/drivers/scsi/bfa/bfa_fcpim.c
@@ -2586,6 +2586,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
case FCP_IODIR_RW:
bfa_stats(itnim, input_reqs);
bfa_stats(itnim, output_reqs);
+ /* fall through */
default:
bfi_h2i_set(m->mh, BFI_MC_IOIM_IO, 0, bfa_fn_lpu(ioim->bfa));
}
@@ -2820,6 +2821,7 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)

case BFI_IOIM_STS_TIMEDOUT:
bfa_stats(ioim->itnim, iocomp_timedout);
+ /* fall through */
case BFI_IOIM_STS_ABORTED:
rsp->io_status = BFI_IOIM_STS_ABORTED;
bfa_stats(ioim->itnim, iocomp_aborted);
@@ -3215,9 +3217,7 @@ bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
switch (event) {
case BFA_TSKIM_SM_DONE:
bfa_reqq_wcancel(&tskim->reqq_wait);
- /*
- * Fall through !!!
- */
+ /* fall through */
case BFA_TSKIM_SM_QRESUME:
bfa_sm_set_state(tskim, bfa_tskim_sm_cleanup);
bfa_tskim_send_abort(tskim);
--
2.17.1


2018-11-28 04:52:36

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

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

Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
annotation and then placed it at the bottom of the corresponding switch
case, which is what GCC is expecting to find.

Addresses-Coverity-ID: 114961 ("Missing break in switch")
Addresses-Coverity-ID: 114962 ("Missing break in switch")
Addresses-Coverity-ID: 114963 ("Missing break in switch")
Addresses-Coverity-ID: 114964 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index 9ee75c9a9aa1..7e5044bf05c0 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -2285,6 +2285,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
switch (scb->hscb->task_management) {
case SIU_TASKMGMT_ABORT_TASK:
tag = SCB_GET_TAG(scb);
+ /* fall through */
case SIU_TASKMGMT_ABORT_TASK_SET:
case SIU_TASKMGMT_CLEAR_TASK_SET:
lun = scb->hscb->lun;
@@ -2295,6 +2296,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
break;
case SIU_TASKMGMT_LUN_RESET:
lun = scb->hscb->lun;
+ /* fall through */
case SIU_TASKMGMT_TARGET_RESET:
{
struct ahd_devinfo devinfo;
@@ -6550,8 +6552,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
kfree(sns_map);
}
ahd_dma_tag_destroy(ahd, scb_data->sense_dmat);
- /* FALLTHROUGH */
}
+ /* fall through */
case 6:
{
struct map_node *sg_map;
@@ -6565,8 +6567,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
kfree(sg_map);
}
ahd_dma_tag_destroy(ahd, scb_data->sg_dmat);
- /* FALLTHROUGH */
}
+ /* fall through */
case 5:
{
struct map_node *hscb_map;
@@ -7209,6 +7211,7 @@ ahd_init(struct ahd_softc *ahd)
case FLX_CSTAT_OVER:
case FLX_CSTAT_UNDER:
warn_user++;
+ /* fall through */
case FLX_CSTAT_INVALID:
case FLX_CSTAT_OKAY:
if (warn_user == 0 && bootverbose == 0)
@@ -8413,7 +8416,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
if ((scb->flags & SCB_ACTIVE) == 0)
printk("Inactive SCB in Waiting List\n");
ahd_done_with_status(ahd, scb, status);
- /* FALLTHROUGH */
+ /* fall through */
case SEARCH_REMOVE:
ahd_rem_wscb(ahd, scbid, prev, next, tid);
*list_tail = prev;
@@ -8422,6 +8425,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
break;
case SEARCH_PRINT:
printk("0x%x ", scbid);
+ /* fall through */
case SEARCH_COUNT:
prev = scbid;
break;
@@ -9547,8 +9551,8 @@ ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
{
fmt3_ins = &instr.format3;
fmt3_ins->address = ahd_resolve_seqaddr(ahd, fmt3_ins->address);
- /* FALLTHROUGH */
}
+ /* fall through */
case AIC_OP_OR:
case AIC_OP_AND:
case AIC_OP_XOR:
@@ -9559,7 +9563,7 @@ ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
fmt1_ins->immediate = dconsts[fmt1_ins->immediate];
}
fmt1_ins->parity = 0;
- /* FALLTHROUGH */
+ /* fall through */
case AIC_OP_ROL:
{
int i, count;
--
2.17.1


2018-11-28 04:52:47

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 12/41] scsi: bfa: bfa_ioc: Mark expected switch fall-throughs

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

Notice that, in this particular case, I replaced "!!! fall through !!!"
comment with "fall through" annotations, which is what GCC is expecting
to find.

Addresses-Coverity-ID: 146155 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/bfa/bfa_ioc.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 16d3aeb0e572..32b24e51cce6 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -978,9 +978,7 @@ bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)

case IOCPF_E_INITFAIL:
bfa_iocpf_timer_stop(ioc);
- /*
- * !!! fall through !!!
- */
+ /* fall through */

case IOCPF_E_TIMEOUT:
writel(1, ioc->ioc_regs.ioc_sem_reg);
@@ -1056,9 +1054,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)

case IOCPF_E_FAIL:
bfa_iocpf_timer_stop(ioc);
- /*
- * !!! fall through !!!
- */
+ /* fall through */

case IOCPF_E_TIMEOUT:
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
@@ -6007,6 +6003,7 @@ bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf,
case BFA_DCONF_SM_IOCDISABLE:
case BFA_DCONF_SM_FLASH_COMP:
bfa_timer_stop(&dconf->timer);
+ /* fall through */
case BFA_DCONF_SM_TIMEOUT:
bfa_sm_set_state(dconf, bfa_dconf_sm_uninit);
bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE);
--
2.17.1


2018-11-28 04:52:58

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

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

Notice that, in this particular case, I replaced "!!! fall through !!!"
with a "fall through" annotation, which is what GCC is expecting to
find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
index b4f2c1d8742e..646f09f66443 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
@@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_OFFLINE:
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
- /*
- * !!! fall through !!!
- */
+ /* fall through */

case BFA_FCS_VPORT_SM_RSP_OK:
case BFA_FCS_VPORT_SM_RSP_ERROR:
@@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
switch (event) {
case BFA_FCS_VPORT_SM_OFFLINE:
bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
- /*
- * !!! fall through !!!
- */
+ /* fall through */

case BFA_FCS_VPORT_SM_RSP_OK:
case BFA_FCS_VPORT_SM_RSP_ERROR:
--
2.17.1


2018-11-28 04:53:01

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 07/41] scsi: be2iscsi: be_iscsi: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/be2iscsi/be_iscsi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 96b96e2ab91a..ed1bd369baa0 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -679,6 +679,7 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
case ISCSI_PARAM_MAX_XMIT_DLENGTH:
if (conn->max_xmit_dlength > 65536)
conn->max_xmit_dlength = 65536;
+ /* fall through */
default:
return 0;
}
--
2.17.1


2018-11-28 04:53:06

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 13/41] scsi: csiostor: csio_wr: mark expected switch fall-through

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

Addresses-Coverity-ID: 1056538 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/csiostor/csio_wr.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
index dc12933533d5..b6861ea66c9f 100644
--- a/drivers/scsi/csiostor/csio_wr.c
+++ b/drivers/scsi/csiostor/csio_wr.c
@@ -808,6 +808,7 @@ csio_wr_destroy_queues(struct csio_hw *hw, bool cmd)

csio_q_eqid(hw, i) = CSIO_MAX_QID;
}
+ /* fall through */
case CSIO_INGRESS:
if (csio_q_iqid(hw, i) != CSIO_MAX_QID) {
csio_wr_cleanup_iq_ftr(hw, i);
--
2.17.1


2018-11-28 04:53:08

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs

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

Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
annotation and then placed it at the bottom of the corresponding switch
case, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index f3362f4ab16e..d4a7263e4b8f 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -4920,24 +4920,30 @@ ahc_fini_scbdata(struct ahc_softc *ahc)
}
ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
}
+ /* fall through */
case 6:
ahc_dmamap_unload(ahc, scb_data->sense_dmat,
scb_data->sense_dmamap);
+ /* fall through */
case 5:
ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense,
scb_data->sense_dmamap);
ahc_dmamap_destroy(ahc, scb_data->sense_dmat,
scb_data->sense_dmamap);
+ /* fall through */
case 4:
ahc_dma_tag_destroy(ahc, scb_data->sense_dmat);
+ /* fall through */
case 3:
ahc_dmamap_unload(ahc, scb_data->hscb_dmat,
scb_data->hscb_dmamap);
+ /* fall through */
case 2:
ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs,
scb_data->hscb_dmamap);
ahc_dmamap_destroy(ahc, scb_data->hscb_dmat,
scb_data->hscb_dmamap);
+ /* fall through */
case 1:
ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat);
break;
@@ -6002,8 +6008,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
if ((scb->flags & SCB_ACTIVE) == 0)
printk("Inactive SCB in Waiting List\n");
ahc_done(ahc, scb);
- /* FALLTHROUGH */
}
+ /* fall through */
case SEARCH_REMOVE:
next = ahc_rem_wscb(ahc, next, prev);
break;
@@ -7008,8 +7014,8 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
}
address -= address_offset;
fmt3_ins->address = address;
- /* FALLTHROUGH */
}
+ /* fall through */
case AIC_OP_OR:
case AIC_OP_AND:
case AIC_OP_XOR:
@@ -7035,7 +7041,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
fmt1_ins->opcode = AIC_OP_AND;
fmt1_ins->immediate = 0xff;
}
- /* FALLTHROUGH */
+ /* fall through */
case AIC_OP_ROL:
if ((ahc->features & AHC_ULTRA2) != 0) {
int i, count;
--
2.17.1


2018-11-28 04:53:09

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 18/41] scsi: isci: remote_device: Mark expected switch fall-throughs

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

Notice that, in this particular case, a dash is added as a token in
order to separate the "fall through" annotations from the rest of
the comment on the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/isci/remote_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index cc51f38b116d..9d29edb9f590 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -310,7 +310,7 @@ static void isci_remote_device_not_ready(struct isci_host *ihost,
/* Kill all outstanding requests for the device. */
sci_remote_device_terminate_requests(idev);

- /* Fall through into the default case... */
+ /* Fall through - into the default case... */
default:
clear_bit(IDEV_IO_READY, &idev->flags);
break;
@@ -593,7 +593,7 @@ enum sci_status sci_remote_device_event_handler(struct isci_remote_device *idev,

break;
}
- /* Else, fall through and treat as unhandled... */
+ /* fall through - and treat as unhandled... */
default:
dev_dbg(scirdev_to_dev(idev),
"%s: device: %p event code: %x: %s\n",
--
2.17.1


2018-11-28 04:53:57

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 19/41] scsi: isci: remote_node_context: mark expected switch fall-throughs

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

Notice that, in this particular case, a dash is added as a token in
order to separate the "Fall through" annotations from the rest of
the comment on the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/isci/remote_node_context.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c
index e3f2a5359d71..474a43460963 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -601,9 +601,9 @@ enum sci_status sci_remote_node_context_suspend(
__func__, sci_rnc);
return SCI_FAILURE_INVALID_STATE;
}
- /* Fall through and handle like SCI_RNC_POSTING */
+ /* Fall through - and handle like SCI_RNC_POSTING */
case SCI_RNC_RESUMING:
- /* Fall through and handle like SCI_RNC_POSTING */
+ /* Fall through - and handle like SCI_RNC_POSTING */
case SCI_RNC_POSTING:
/* Set the destination state to AWAIT - this signals the
* entry into the SCI_RNC_READY state that a suspension
--
2.17.1


2018-11-28 04:54:20

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 14/41] scsi: esas2r: esas2r_init: 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 <[email protected]>
---
drivers/scsi/esas2r/esas2r_init.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
index 46b2c83ba21f..950cd92df2ff 100644
--- a/drivers/scsi/esas2r/esas2r_init.c
+++ b/drivers/scsi/esas2r/esas2r_init.c
@@ -1241,6 +1241,7 @@ static bool esas2r_format_init_msg(struct esas2r_adapter *a,
a->init_msg = ESAS2R_INIT_MSG_GET_INIT;
break;
}
+ /* fall through */

case ESAS2R_INIT_MSG_GET_INIT:
if (msg == ESAS2R_INIT_MSG_GET_INIT) {
@@ -1254,7 +1255,7 @@ static bool esas2r_format_init_msg(struct esas2r_adapter *a,
esas2r_hdebug("FAILED");
}
}
- /* fall through */
+ /* fall through */

default:
rq->req_stat = RS_SUCCESS;
--
2.17.1


2018-11-28 04:54:24

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 17/41] scsi: isci: phy: Mark expected switch fall-through

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

Addresses-Coverity-ID: 703127 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/isci/phy.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 1deca8c5a94f..7f9b3f20e5e4 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -778,6 +778,7 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
case SCU_EVENT_LINK_FAILURE:
scu_link_layer_set_txcomsas_timeout(iphy, SCU_SAS_LINK_LAYER_TXCOMSAS_NEGTIME_DEFAULT);
+ /* fall through */
case SCU_EVENT_HARD_RESET_RECEIVED:
/* Start the oob/sn state machine over again */
sci_change_state(&iphy->sm, SCI_PHY_STARTING);
--
2.17.1


2018-11-28 04:54:40

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 20/41] scsi: isci: request: mark expected switch fall-through

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

Notice that, in this particular case, a dash is added as a token in
order to separate the "Fall through" annotation from the rest of the
comment on the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/isci/request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 2f151708b59a..1b18cf55167e 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -894,7 +894,7 @@ sci_io_request_terminate(struct isci_request *ireq)
* and don't wait for the task response.
*/
sci_change_state(&ireq->sm, SCI_REQ_ABORTING);
- /* Fall through and handle like ABORTING... */
+ /* Fall through - and handle like ABORTING... */
case SCI_REQ_ABORTING:
if (!isci_remote_device_is_safe_to_abort(ireq->target_device))
set_bit(IREQ_PENDING_ABORT, &ireq->flags);
--
2.17.1


2018-11-28 04:55:28

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 23/41] scsi: lpfc: lpfc_els: Mark expected switch fall-throughs

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

Addresses-Coverity-ID: 114978 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/lpfc/lpfc_els.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 5c34bfa624ef..1f20c35e0f84 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -8649,6 +8649,7 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
lpfc_nlp_put(ndlp);
return;
}
+ /* fall through */

default:
/* Try to recover from this error */
--
2.17.1


2018-11-28 04:56:50

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 24/41] scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs

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

Notice that, in this particular case, I replaced "Drop thru" with a
"fall through" annotation, which is what GCC is expecting to find.

Addresses-Coverity-ID: 114976 ("Missing break in switch")
Addresses-Coverity-ID: 114977 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 6c2fb55d739b..1a61806739ff 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -4645,9 +4645,11 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba,
case CMD_GEN_REQUEST64_CR:
if (iocb->context_un.ndlp == ndlp)
return 1;
+ /* fall through */
case CMD_ELS_REQUEST64_CR:
if (icmd->un.elsreq64.remoteID == ndlp->nlp_DID)
return 1;
+ /* fall through */
case CMD_XMIT_ELS_RSP64_CX:
if (iocb->context1 == (uint8_t *) ndlp)
return 1;
@@ -5791,7 +5793,7 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport)

case LPFC_LINK_UP:
lpfc_issue_clear_la(phba, vport);
- /* Drop thru */
+ /* fall through */
case LPFC_LINK_UNKNOWN:
case LPFC_WARM_START:
case LPFC_INIT_START:
--
2.17.1


2018-11-28 04:57:45

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 36/41] scsi: qla4xxx: ql4_os: mark expected switch fall-through

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

Notice that, in this particular case, I replaced "allow fall-through"
with a "fall through" annotation, which is what GCC is expecting to
find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/qla4xxx/ql4_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 1c702cd22359..7fd3491ea2d9 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -2876,7 +2876,7 @@ static int qla4xxx_session_get_param(struct iscsi_cls_session *cls_sess,
chap_tbl.secret_len);
}
}
- /* allow fall-through */
+ /* fall through */
default:
return iscsi_session_get_param(cls_sess, param, buf);
}
--
2.17.1


2018-11-28 04:57:54

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 34/41] scsi: osst: mark expected switch fall-throughs

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

Addresses-Coverity-ID: 114983 ("Missing break in switch")
Addresses-Coverity-ID: 114984 ("Missing break in switch")
Addresses-Coverity-ID: 114985 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/osst.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 664c1238a87f..7e877b43785d 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -216,12 +216,14 @@ static void osst_analyze_sense(struct osst_request *SRpnt, struct st_cmdstatus *
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);
@@ -591,6 +593,7 @@ static void osst_init_aux(struct osst_tape * STp, int frame_type, int frame_seq_
dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER?
OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA;
dat->dat_list[0].reserved = 0;
+ /* fall through */
case OS_FRAME_TYPE_EOD:
aux->update_frame_cntr = htonl(0);
par->partition_num = OS_DATA_PARTITION;
@@ -4086,6 +4089,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
switch (cmd_in) {
case MTFSFM:
chg_eof = 0; /* Changed from the FSF after this */
+ /* fall through */
case MTFSF:
if (STp->raw)
return (-EIO);
@@ -4101,6 +4105,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,

case MTBSF:
chg_eof = 0; /* Changed from the FSF after this */
+ /* fall through */
case MTBSFM:
if (STp->raw)
return (-EIO);
@@ -4312,6 +4317,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
name, STp->block_size);
return 0;
}
+ /* fall through */
case MTSETDENSITY: /* Set tape density */
case MTSETDRVBUFFER: /* Set drive buffering */
case SET_DENS_AND_BLK: /* Set density and block size */
--
2.17.1


2018-11-28 04:58:36

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 29/41] scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through

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

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index b7d3fc6fb118..9db7aebc3564 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3281,6 +3281,7 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
megasas_complete_int_cmd(instance, cmd);
break;
}
+ /* fall through */

case MFI_CMD_LD_READ:
case MFI_CMD_LD_WRITE:
--
2.17.1


2018-11-28 04:59:19

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 30/41] scsi: megaraid_sas_fusion: Mark expected switch fall-through

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

Notice that, in this particular case, I replaced "Fall thru" with a
"Fall through" annotation and added a dash as a token in order to
separate the "Fall through" annotation from the rest of the comment
on the same line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index c5e6bccb0895..8f37ad83be9a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3453,7 +3453,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex)
atomic_dec(&lbinfo->scsi_pending_cmds[cmd_fusion->pd_r1_lb]);
cmd_fusion->scmd->SCp.Status &= ~MEGASAS_LOAD_BALANCE_FLAG;
}
- //Fall thru and complete IO
+ /* Fall through - and complete IO */
case MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST: /* LD-IO Path */
atomic_dec(&instance->fw_outstanding);
if (cmd_fusion->r1_alt_dev_handle == MR_DEVHANDLE_INVALID) {
--
2.17.1


2018-11-28 04:59:25

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 28/41] scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs

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

Notice that, in this particular case, I replaced "Drop thru" and
"Fall Thru" with "fall through" annotations, which is what GCC
is expecting to find.

Also, in some cases a dash is added as a token in order to separate
the "fall through" annotation from the rest of the comment on the
same line, which is what GCC is expecting to find.

Addresses-Coverity-ID: 114979 ("Missing break in switch")
Addresses-Coverity-ID: 114980 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 3912a2d0b95d..cbcda5a91068 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -9334,6 +9334,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
cmnd = CMD_XMIT_SEQUENCE64_CR;
if (phba->link_flag & LS_LOOPBACK_MODE)
bf_set(wqe_xo, &wqe->xmit_sequence.wge_ctl, 1);
+ /* fall through */
case CMD_XMIT_SEQUENCE64_CR:
/* word3 iocb=io_tag32 wqe=reserved */
wqe->xmit_sequence.rsvd3 = 0;
@@ -13460,6 +13461,7 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe)
case FC_STATUS_RQ_BUF_LEN_EXCEEDED:
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"2537 Receive Frame Truncated!!\n");
+ /* fall through */
case FC_STATUS_RQ_SUCCESS:
spin_lock_irqsave(&phba->hbalock, iflags);
lpfc_sli4_rq_release(hrq, drq);
@@ -13859,7 +13861,7 @@ lpfc_sli4_nvmet_handle_rcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
case FC_STATUS_RQ_BUF_LEN_EXCEEDED:
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"6126 Receive Frame Truncated!!\n");
- /* Drop thru */
+ /* fall through */
case FC_STATUS_RQ_SUCCESS:
spin_lock_irqsave(&phba->hbalock, iflags);
lpfc_sli4_rq_release(hrq, drq);
@@ -14769,7 +14771,7 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax)
eq->entry_count);
if (eq->entry_count < 256)
return -EINVAL;
- /* otherwise default to smallest count (drop through) */
+ /* fall through - otherwise default to smallest count */
case 256:
bf_set(lpfc_eq_context_count, &eq_create->u.request.context,
LPFC_EQ_CNT_256);
@@ -14899,7 +14901,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
LPFC_CQ_CNT_WORD7);
break;
}
- /* Fall Thru */
+ /* fall through */
default:
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"0361 Unsupported CQ count: "
@@ -14910,7 +14912,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
status = -EINVAL;
goto out;
}
- /* otherwise default to smallest count (drop through) */
+ /* fall through - otherwise default to smallest count */
case 256:
bf_set(lpfc_cq_context_count, &cq_create->u.request.context,
LPFC_CQ_CNT_256);
@@ -15070,7 +15072,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
LPFC_CQ_CNT_WORD7);
break;
}
- /* Fall Thru */
+ /* fall through */
default:
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"3118 Bad CQ count. (%d)\n",
@@ -15079,7 +15081,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
status = -EINVAL;
goto out;
}
- /* otherwise default to smallest (drop thru) */
+ /* fall through - otherwise default to smallest */
case 256:
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
&cq_set->u.request, LPFC_CQ_CNT_256);
@@ -15351,7 +15353,7 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq,
status = -EINVAL;
goto out;
}
- /* otherwise default to smallest count (drop through) */
+ /* fall through - otherwise default to smallest count */
case 16:
bf_set(lpfc_mq_context_ring_size,
&mq_create_ext->u.request.context,
@@ -15770,7 +15772,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
status = -EINVAL;
goto out;
}
- /* otherwise default to smallest count (drop through) */
+ /* fall through - otherwise default to smallest count */
case 512:
bf_set(lpfc_rq_context_rqe_count,
&rq_create->u.request.context,
@@ -15907,7 +15909,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
status = -EINVAL;
goto out;
}
- /* otherwise default to smallest count (drop through) */
+ /* fall through - otherwise default to smallest count */
case 512:
bf_set(lpfc_rq_context_rqe_count,
&rq_create->u.request.context,
--
2.17.1


2018-11-28 05:00:06

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 35/41] scsi: ppa: mark expected switch fall-through

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

Addresses-Coverity-ID: 114988 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/ppa.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index ee86a0c62dbf..d29999ba5458 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -717,6 +717,7 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
}
cmd->SCp.phase++;
}
+ /* fall through */

case 2: /* Phase 2 - We are now talking to the scsi bus */
if (!ppa_select(dev, scmd_id(cmd))) {
--
2.17.1


2018-11-28 05:00:23

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 38/41] scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs

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

Addresses-Coverity-ID: 114996 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 0a2a54517b15..054fb0599263 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -3072,6 +3072,7 @@ static void sym_sir_bad_scsi_status(struct sym_hcb *np, int num, struct sym_ccb
sym_print_addr(cp->cmd, "%s\n",
s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n");
}
+ /* fall through */
default: /* S_INT, S_INT_COND_MET, S_CONFLICT */
sym_complete_error (np, cp);
break;
@@ -4632,6 +4633,7 @@ static void sym_int_sir(struct sym_hcb *np)
* Negotiation failed.
* Target does not want answer message.
*/
+ /* fall through */
case SIR_NEGO_PROTO:
sym_nego_default(np, tp, cp);
goto out;
--
2.17.1


2018-11-28 05:20:33

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 32/41] scsi: myrb: Mark expected switch fall-throughs

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

Addresses-Coverity-ID: 1465234 ("Missing break in switch")
Addresses-Coverity-ID: 1465238 ("Missing break in switch")
Addresses-Coverity-ID: 1465242 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/myrb.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index 0642f2d0a3bb..539ac8ce4fcd 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -1528,6 +1528,7 @@ static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
scmd->scsi_done(scmd);
return 0;
}
+ /* fall through */
case WRITE_6:
lba = (((scmd->cmnd[1] & 0x1F) << 16) |
(scmd->cmnd[2] << 8) |
@@ -1544,6 +1545,7 @@ static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
scmd->scsi_done(scmd);
return 0;
}
+ /* fall through */
case WRITE_10:
case VERIFY: /* 0x2F */
case WRITE_VERIFY: /* 0x2E */
@@ -1560,6 +1562,7 @@ static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
scmd->scsi_done(scmd);
return 0;
}
+ /* fall through */
case WRITE_12:
case VERIFY_12: /* 0xAF */
case WRITE_VERIFY_12: /* 0xAE */
--
2.17.1


2018-11-28 05:20:59

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 31/41] scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through

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

Addresses-Coverity-ID: 1475400 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 5b9806d0719e..920b80ce4748 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -10370,6 +10370,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
case MPI26_MFGPAGE_DEVID_CFG_SEC_3916:
dev_info(&pdev->dev,
"HBA is in Configurable Secure mode\n");
+ /* fall through */
case MPI26_MFGPAGE_DEVID_SAS3508:
case MPI26_MFGPAGE_DEVID_SAS3508_1:
case MPI26_MFGPAGE_DEVID_SAS3408:
--
2.17.1


2018-11-28 06:03:55

by Juergen Gross

[permalink] [raw]
Subject: Re: [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through

On 28/11/2018 05:34, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced
> "Missed the backend's Closing state -- fallthrough" with
> "fall through - Missed the backend's Closing state", which
> contains the "fall through" annotation at the beginnig of
> the code comment, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Reviewed-by: Juergen Gross <[email protected]>


Juergen

2018-11-28 06:16:33

by Avri Altman

[permalink] [raw]
Subject: RE: [PATCH 40/41] scsi: ufs: ufshcd: mark expected switch fall-throughs

Already submitted by Tomas:
https://www.spinics.net/lists/linux-scsi/msg125659.html

Thanks,
Avri

> -----Original Message-----
> From: [email protected] <[email protected]>
> On Behalf Of Gustavo A. R. Silva
> Sent: Wednesday, November 28, 2018 6:34 AM
> To: Vinayak Holikatti <[email protected]>
> Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen
> <[email protected]>; [email protected]; linux-
> [email protected]; Gustavo A. R. Silva <[email protected]>
> Subject: [PATCH 40/41] scsi: ufs: ufshcd: mark expected switch fall-throughs
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1087954 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 003d489f1b4b..be207197b63f 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1551,6 +1551,7 @@ int ufshcd_hold(struct ufs_hba *hba, bool async)
> * currently running. Hence, fall through to cancel gating
> * work and to enable clocks.
> */
> + /* fall through */
> case CLKS_OFF:
> ufshcd_scsi_block_requests(hba);
> hba->clk_gating.state = REQ_CLKS_ON;
> @@ -1562,6 +1563,7 @@ int ufshcd_hold(struct ufs_hba *hba, bool async)
> * fall through to check if we should wait for this
> * work to be done or not.
> */
> + /* fall through */
> case REQ_CLKS_ON:
> if (async) {
> rc = -EAGAIN;
> @@ -4620,6 +4622,7 @@ ufshcd_scsi_cmd_status(struct ufshcd_lrb *lrbp,
> int scsi_status)
> switch (scsi_status) {
> case SAM_STAT_CHECK_CONDITION:
> ufshcd_copy_sense_data(lrbp);
> + /* fall through */
> case SAM_STAT_GOOD:
> result |= DID_OK << 16 |
> COMMAND_COMPLETE << 8 |
> --
> 2.17.1


2018-11-28 06:41:12

by Sumit Saxena

[permalink] [raw]
Subject: Re: [PATCH 29/41] scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through

On Wed, Nov 28, 2018 at 10:02 AM Gustavo A. R. Silva
<[email protected]> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Sumit Saxena <[email protected]>
> ---
> drivers/scsi/megaraid/megaraid_sas_base.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index b7d3fc6fb118..9db7aebc3564 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -3281,6 +3281,7 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
> megasas_complete_int_cmd(instance, cmd);
> break;
> }
> + /* fall through */
>
> case MFI_CMD_LD_READ:
> case MFI_CMD_LD_WRITE:
> --
> 2.17.1
>

2018-11-28 06:43:43

by Sumit Saxena

[permalink] [raw]
Subject: Re: [PATCH 30/41] scsi: megaraid_sas_fusion: Mark expected switch fall-through

On Wed, Nov 28, 2018 at 10:02 AM Gustavo A. R. Silva
<[email protected]> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Fall thru" with a
> "Fall through" annotation and added a dash as a token in order to
> separate the "Fall through" annotation from the rest of the comment
> on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Sumit Saxena <[email protected]>

> ---
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> index c5e6bccb0895..8f37ad83be9a 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> @@ -3453,7 +3453,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex)
> atomic_dec(&lbinfo->scsi_pending_cmds[cmd_fusion->pd_r1_lb]);
> cmd_fusion->scmd->SCp.Status &= ~MEGASAS_LOAD_BALANCE_FLAG;
> }
> - //Fall thru and complete IO
> + /* Fall through - and complete IO */
> case MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST: /* LD-IO Path */
> atomic_dec(&instance->fw_outstanding);
> if (cmd_fusion->r1_alt_dev_handle == MR_DEVHANDLE_INVALID) {
> --
> 2.17.1
>

2018-11-28 08:23:04

by Michael Schmitz

[permalink] [raw]
Subject: Re: [PATCH 02/41] scsi: NCR5380: Mark expected switch fall-through

Gustavo,


Am 28.11.18 um 17:24 schrieb Gustavo A. R. Silva:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case, I replaced "Fall through to reject message"
> with a "fall through" annotation at the bottom of the case, which is what GCC
> is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/NCR5380.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
> index 01c23d27f290..12073e52a0eb 100644
> --- a/drivers/scsi/NCR5380.c
> +++ b/drivers/scsi/NCR5380.c
> @@ -1933,12 +1933,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
> if (!hostdata->connected)
> return;
>
> - /* Fall through to reject message */
> -
> /*
> * If we get something weird that we aren't expecting,
> * reject it.
> */
> + /* fall through */
> default:
> if (tmp == EXTENDED_MESSAGE)
> scmd_printk(KERN_INFO, cmd,
I believe the 'if we get something weird' comment block relates to the
default branch of the switch, _not_ the fall through from the case above
(extended message received that we end up rejecting). Ordering the
comments like you did just for GCC's sake is misleading.

The comment block should perhaps be moved after the default label. And
it would be nice if the reason for the fall through could be retained in
the comment.

Cheers,

    Michael




2018-11-28 13:49:34

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 02/41] scsi: NCR5380: Mark expected switch fall-through

Hi Michael,

On 11/28/18 2:22 AM, Michael Schmitz wrote:

> I believe the 'if we get something weird' comment block relates to the
> default branch of the switch, _not_ the fall through from the case above
> (extended message received that we end up rejecting). Ordering the
> comments like you did just for GCC's sake is misleading.
>
> The comment block should perhaps be moved after the default label. And
> it would be nice if the reason for the fall through could be retained in
> the comment.
>

Oh Okay. I'll do that.

Thanks for the feedback.
--
Gustavo

2018-11-28 15:17:33

by Don Brace

[permalink] [raw]
Subject: RE: [PATCH 15/41] scsi: hpsa: mark expected switch fall-throughs

-----Original Message-----
From: Gustavo A. R. Silva [mailto:[email protected]]
Sent: Tuesday, November 27, 2018 10:29 PM
To: Don Brace <[email protected]>; [email protected]
Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]; Gustavo A. R. Silva <[email protected]>
Subject: [PATCH 15/41] scsi: hpsa: mark expected switch fall-throughs

EXTERNAL EMAIL


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

Addresses-Coverity-ID: 1195463 ("Missing break in switch")
Addresses-Coverity-ID: 1195464 ("Missing break in switch")
Addresses-Coverity-ID: 1195465 ("Missing break in switch")
Addresses-Coverity-ID: 1195466 ("Missing break in switch")
Addresses-Coverity-ID: 1357338 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Don Brace <[email protected]>


2018-11-28 19:24:25

by Dave.Carroll

[permalink] [raw]
Subject: RE: [PATCH 03/41] scsi: aacraid: aachba: Mark expected switch fall-throughs



> -----Original Message-----
> From: Gustavo A. R. Silva [mailto:[email protected]]
> Sent: Tuesday, November 27, 2018 9:26 PM
> To: Adaptec OEM Raid Solutions <[email protected]>
> Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen
> <[email protected]>; [email protected]; linux-
> [email protected]; Gustavo A. R. Silva <[email protected]>
> Subject: [PATCH 03/41] scsi: aacraid: aachba: Mark expected switch fall-
> throughs
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
> we are expecting to fall through.
>
> Also, a break statement is properly aligned.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
Reviewed-by: Dave Carroll <[email protected]>

2018-11-28 19:46:36

by Dave.Carroll

[permalink] [raw]
Subject: RE: [PATCH 04/41] scsi: aacraid: linit: Mark expected switch fall-through

> -----Original Message-----
> From: Gustavo A. R. Silva [mailto:[email protected]]
> Sent: Tuesday, November 27, 2018 9:26 PM
> To: Adaptec OEM Raid Solutions <[email protected]>
> Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen
> <[email protected]>; [email protected]; linux-
> [email protected]; Gustavo A. R. Silva <[email protected]>
> Subject: [PATCH 04/41] scsi: aacraid: linit: Mark expected switch fall-through
>
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
> we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/aacraid/linit.c | 1 +

Reviewed-by: Dave Carroll <[email protected]>

2018-11-29 02:52:32

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 04/41] scsi: aacraid: linit: Mark expected switch fall-through


Gustavo A.,

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

Applied to 4.21/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2018-11-29 02:52:41

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 15/41] scsi: hpsa: mark expected switch fall-throughs


Gustavo A.,

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

Applied to 4.21/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2018-11-29 02:53:21

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 03/41] scsi: aacraid: aachba: Mark expected switch fall-throughs


Gustavo A.,

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

Applied to 4.21/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2018-11-29 02:53:21

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 21/41] scsi: libfc: fc_rport: Mark expected switch fall-through


Gustavo A.,

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

Applied to 4.21/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2018-11-29 02:53:28

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 29/41] scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through


Gustavo A.,

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

Applied to 4.21/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2018-11-29 02:53:41

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 30/41] scsi: megaraid_sas_fusion: Mark expected switch fall-through


Gustavo A.,

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Fall thru" with a
> "Fall through" annotation and added a dash as a token in order to
> separate the "Fall through" annotation from the rest of the comment
> on the same line, which is what GCC is expecting to find.

Applied to 4.21/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2018-11-29 02:55:25

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through


Gustavo A.,

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced
> "Missed the backend's Closing state -- fallthrough" with
> "fall through - Missed the backend's Closing state", which
> contains the "fall through" annotation at the beginnig of
> the code comment, which is what GCC is expecting to find.

Applied to 4.21/scsi-queue, thanks!

--
Martin K. Petersen Oracle Linux Engineering

2018-12-03 18:44:09

by Khalid Aziz

[permalink] [raw]
Subject: Re: [PATCH 01/41] scsi: BusLogic: mark expected switch fall-through

On 11/27/18 9:21 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1056537 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/BusLogic.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index 9cee941f97d6..717eef3ee893 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -2641,6 +2641,7 @@ static int blogic_resultcode(struct blogic_adapter *adapter,
> case BLOGIC_BAD_CMD_PARAM:
> blogic_warn("BusLogic Driver Protocol Error 0x%02X\n",
> adapter, adapter_status);
> + /* fall through */
> case BLOGIC_DATA_UNDERRUN:
> case BLOGIC_DATA_OVERRUN:
> case BLOGIC_NOEXPECT_BUSFREE:
>

Looks good.

Acked-by: Khalid Aziz <[email protected]>

2018-12-08 02:37:06

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 01/41] scsi: BusLogic: mark expected switch fall-through


Gustavo A.,

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

Applied to 4.21/scsi-queue, thanks.

--
Martin K. Petersen Oracle Linux Engineering

2018-12-18 15:45:44

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 00/41] scsi: Mark expected switch fall-throughs

Hi Martin,

Friendly ping:

Only 8 out the 41 patches in this series have been applied so far.

I wonder if you could apply the rest of this series, except:

[PATCH 02/41] scsi: NCR5380: Mark expected switch fall-through

(I'll send a v2 of this patch)

Thanks
--
Gustavo

On 11/27/18 10:18 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, this patchset aims
> to mark switch cases where we are expecting to fall through.
>
> I reviewed case by case and concluded that each of them is an
> intentional fall-through. However, it doesn't hurt that the
> maintainers and supporters of each driver take a look. :)
>
> Each commit log contains the particular details for the changes in the
> corresponding file.
>
> This series fix a total of 110 of the following type of warnings in
> drivers/scsi:
>
> drivers/scsi/aic7xxx/aic7xxx_core.c:4921:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/aic7xxx/aic7xxx_core.c:4923:2: note: here
> case 6:
> ^~~~
>
> Thanks!
>
> Gustavo A. R. Silva (41):
> scsi: BusLogic: mark expected switch fall-through
> scsi: NCR5380: Mark expected switch fall-through
> scsi: aacraid: aachba: Mark expected switch fall-throughs
> scsi: aacraid: linit: Mark expected switch fall-through
> scsi: aic7xxx: aic79xx: mark expected switch fall-through
> scsi: aic7xxx: mark expected switch fall-throughs
> scsi: be2iscsi: be_iscsi: Mark expected switch fall-through
> scsi: be2iscsi: be_main: Mark expected switch fall-through
> scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs
> scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs
> scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs
> scsi: bfa: bfa_ioc: Mark expected switch fall-throughs
> scsi: csiostor: csio_wr: mark expected switch fall-through
> scsi: esas2r: esas2r_init: mark expected switch fall-throughs
> scsi: hpsa: mark expected switch fall-throughs
> scsi: imm: mark expected switch fall-throughs
> scsi: isci: phy: Mark expected switch fall-through
> scsi: isci: remote_device: Mark expected switch fall-throughs
> scsi: isci: remote_node_context: mark expected switch fall-throughs
> scsi: isci: request: mark expected switch fall-through
> scsi: libfc: fc_rport: Mark expected switch fall-through
> scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs
> scsi: lpfc: lpfc_els: Mark expected switch fall-throughs
> scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs
> scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through
> scsi: lpfc: lpfc_nvme: Mark expected switch fall-through
> scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs
> scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs
> scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through
> scsi: megaraid_sas_fusion: Mark expected switch fall-through
> scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through
> scsi: myrb: Mark expected switch fall-throughs
> scsi: osd: osd_initiator: mark expected switch fall-throughs
> scsi: osst: mark expected switch fall-throughs
> scsi: ppa: mark expected switch fall-through
> scsi: qla4xxx: ql4_os: mark expected switch fall-through
> scsi: st: mark expected switch fall-throughs
> scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs
> scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through
> scsi: ufs: ufshcd: mark expected switch fall-throughs
> scsi: xen-scsifront: mark expected switch fall-through
>
> drivers/scsi/BusLogic.c | 1 +
> drivers/scsi/NCR5380.c | 3 +-
> drivers/scsi/aacraid/aachba.c | 5 +++-
> drivers/scsi/aacraid/linit.c | 1 +
> drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++----
> drivers/scsi/aic7xxx/aic7xxx_core.c | 12 ++++++--
> drivers/scsi/be2iscsi/be_iscsi.c | 1 +
> drivers/scsi/be2iscsi/be_main.c | 1 +
> drivers/scsi/bfa/bfa_fcpim.c | 6 ++--
> drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++---
> drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++-------
> drivers/scsi/bfa/bfa_ioc.c | 9 ++----
> drivers/scsi/csiostor/csio_wr.c | 1 +
> drivers/scsi/esas2r/esas2r_init.c | 3 +-
> drivers/scsi/hpsa.c | 5 ++++
> drivers/scsi/imm.c | 33 +++++++++++----------
> drivers/scsi/isci/phy.c | 1 +
> drivers/scsi/isci/remote_device.c | 4 +--
> drivers/scsi/isci/remote_node_context.c | 4 +--
> drivers/scsi/isci/request.c | 2 +-
> drivers/scsi/libfc/fc_rport.c | 1 +
> drivers/scsi/lpfc/lpfc_ct.c | 2 ++
> drivers/scsi/lpfc/lpfc_els.c | 1 +
> drivers/scsi/lpfc/lpfc_hbadisc.c | 4 ++-
> drivers/scsi/lpfc/lpfc_nportdisc.c | 1 +
> drivers/scsi/lpfc/lpfc_nvme.c | 1 +
> drivers/scsi/lpfc/lpfc_scsi.c | 8 ++---
> drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++------
> drivers/scsi/megaraid/megaraid_sas_base.c | 1 +
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
> drivers/scsi/myrb.c | 3 ++
> drivers/scsi/osd/osd_initiator.c | 3 +-
> drivers/scsi/osst.c | 6 ++++
> drivers/scsi/ppa.c | 1 +
> drivers/scsi/qla4xxx/ql4_os.c | 2 +-
> drivers/scsi/st.c | 4 +++
> drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
> drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
> drivers/scsi/ufs/ufshcd.c | 3 ++
> drivers/scsi/xen-scsifront.c | 2 +-
> 41 files changed, 124 insertions(+), 78 deletions(-)
>

2018-12-18 17:15:30

by Boaz Harrosh

[permalink] [raw]
Subject: Re: [PATCH 33/41] scsi: osd: osd_initiator: mark expected switch fall-throughs

On 28/11/18 06:32, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

ACK-by: Boaz Harrosh <[email protected]>

> ---
> drivers/scsi/osd/osd_initiator.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
> index 60cf7c5eb880..cb26f26d5ec1 100644
> --- a/drivers/scsi/osd/osd_initiator.c
> +++ b/drivers/scsi/osd/osd_initiator.c
> @@ -1849,6 +1849,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
> 32, 1, dump, sizeof(dump), true);
> OSD_SENSE_PRINT2("response_integrity [%s]\n", dump);
> }
> + /* fall through */
> case osd_sense_attribute_identification:
> {
> struct osd_sense_attributes_data_descriptor
> @@ -1879,7 +1880,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
> attr_page, attr_id);
> }
> }
> - /*These are not legal for OSD*/
> + /* fall through - These are not legal for OSD */
> case scsi_sense_field_replaceable_unit:
> OSD_SENSE_PRINT2("scsi_sense_field_replaceable_unit\n");
> break;
>


2018-12-18 17:21:12

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 33/41] scsi: osd: osd_initiator: mark expected switch fall-throughs



On 12/18/18 11:13 AM, Boaz Harrosh wrote:
> On 28/11/18 06:32, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>
> ACK-by: Boaz Harrosh <[email protected]>
>

Thank you, Boaz.
--
Gustavo

2018-12-19 05:11:33

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 00/41] scsi: Mark expected switch fall-throughs



On 12/18/18 9:45 PM, Martin K. Petersen wrote:
>
> If you haven't received feedback on a patch you should poke the relevant
> driver maintainer.
>

Got it. Will do so.

Thanks
--
Gustavo

2018-12-19 16:07:50

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
> annotation and then placed it at the bottom of the corresponding switch
> case, which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114961 ("Missing break in switch")
> Addresses-Coverity-ID: 114962 ("Missing break in switch")
> Addresses-Coverity-ID: 114963 ("Missing break in switch")
> Addresses-Coverity-ID: 114964 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
> index 9ee75c9a9aa1..7e5044bf05c0 100644
> --- a/drivers/scsi/aic7xxx/aic79xx_core.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_core.c
> @@ -2285,6 +2285,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
> switch (scb->hscb->task_management) {
> case SIU_TASKMGMT_ABORT_TASK:
> tag = SCB_GET_TAG(scb);
> + /* fall through */
> case SIU_TASKMGMT_ABORT_TASK_SET:
> case SIU_TASKMGMT_CLEAR_TASK_SET:
> lun = scb->hscb->lun;
> @@ -2295,6 +2296,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
> break;
> case SIU_TASKMGMT_LUN_RESET:
> lun = scb->hscb->lun;
> + /* fall through */
> case SIU_TASKMGMT_TARGET_RESET:
> {
> struct ahd_devinfo devinfo;
> @@ -6550,8 +6552,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
> kfree(sns_map);
> }
> ahd_dma_tag_destroy(ahd, scb_data->sense_dmat);
> - /* FALLTHROUGH */
> }
> + /* fall through */
> case 6:
> {
> struct map_node *sg_map;
> @@ -6565,8 +6567,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
> kfree(sg_map);
> }
> ahd_dma_tag_destroy(ahd, scb_data->sg_dmat);
> - /* FALLTHROUGH */
> }
> + /* fall through */
> case 5:
> {
> struct map_node *hscb_map;
> @@ -7209,6 +7211,7 @@ ahd_init(struct ahd_softc *ahd)
> case FLX_CSTAT_OVER:
> case FLX_CSTAT_UNDER:
> warn_user++;
> + /* fall through */
> case FLX_CSTAT_INVALID:
> case FLX_CSTAT_OKAY:
> if (warn_user == 0 && bootverbose == 0)
> @@ -8413,7 +8416,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
> if ((scb->flags & SCB_ACTIVE) == 0)
> printk("Inactive SCB in Waiting List\n");
> ahd_done_with_status(ahd, scb, status);
> - /* FALLTHROUGH */
> + /* fall through */
> case SEARCH_REMOVE:
> ahd_rem_wscb(ahd, scbid, prev, next, tid);
> *list_tail = prev;
> @@ -8422,6 +8425,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
> break;
> case SEARCH_PRINT:
> printk("0x%x ", scbid);
> + /* fall through */
> case SEARCH_COUNT:
> prev = scbid;
> break;
> @@ -9547,8 +9551,8 @@ ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
> {
> fmt3_ins = &instr.format3;
> fmt3_ins->address = ahd_resolve_seqaddr(ahd, fmt3_ins->address);
> - /* FALLTHROUGH */
> }
> + /* fall through */
> case AIC_OP_OR:
> case AIC_OP_AND:
> case AIC_OP_XOR:
> @@ -9559,7 +9563,7 @@ ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
> fmt1_ins->immediate = dconsts[fmt1_ins->immediate];
> }
> fmt1_ins->parity = 0;
> - /* FALLTHROUGH */
> + /* fall through */
> case AIC_OP_ROL:
> {
> int i, count;
>

2018-12-19 16:08:51

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
> annotation and then placed it at the bottom of the corresponding switch
> case, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
> index f3362f4ab16e..d4a7263e4b8f 100644
> --- a/drivers/scsi/aic7xxx/aic7xxx_core.c
> +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
> @@ -4920,24 +4920,30 @@ ahc_fini_scbdata(struct ahc_softc *ahc)
> }
> ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
> }
> + /* fall through */
> case 6:
> ahc_dmamap_unload(ahc, scb_data->sense_dmat,
> scb_data->sense_dmamap);
> + /* fall through */
> case 5:
> ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense,
> scb_data->sense_dmamap);
> ahc_dmamap_destroy(ahc, scb_data->sense_dmat,
> scb_data->sense_dmamap);
> + /* fall through */
> case 4:
> ahc_dma_tag_destroy(ahc, scb_data->sense_dmat);
> + /* fall through */
> case 3:
> ahc_dmamap_unload(ahc, scb_data->hscb_dmat,
> scb_data->hscb_dmamap);
> + /* fall through */
> case 2:
> ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs,
> scb_data->hscb_dmamap);
> ahc_dmamap_destroy(ahc, scb_data->hscb_dmat,
> scb_data->hscb_dmamap);
> + /* fall through */
> case 1:
> ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat);
> break;
> @@ -6002,8 +6008,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
> if ((scb->flags & SCB_ACTIVE) == 0)
> printk("Inactive SCB in Waiting List\n");
> ahc_done(ahc, scb);
> - /* FALLTHROUGH */
> }
> + /* fall through */
> case SEARCH_REMOVE:
> next = ahc_rem_wscb(ahc, next, prev);
> break;
> @@ -7008,8 +7014,8 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
> }
> address -= address_offset;
> fmt3_ins->address = address;
> - /* FALLTHROUGH */
> }
> + /* fall through */
> case AIC_OP_OR:
> case AIC_OP_AND:
> case AIC_OP_XOR:
> @@ -7035,7 +7041,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
> fmt1_ins->opcode = AIC_OP_AND;
> fmt1_ins->immediate = 0xff;
> }
> - /* FALLTHROUGH */
> + /* fall through */
> case AIC_OP_ROL:
> if ((ahc->features & AHC_ULTRA2) != 0) {
> int i, count;
>

2018-12-19 16:09:21

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 08/41] scsi: be2iscsi: be_main: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1357387 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/be2iscsi/be_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index effb6fc95af4..b6449da1320c 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -1539,6 +1539,7 @@ beiscsi_hdl_get_handle(struct beiscsi_conn *beiscsi_conn,
> break;
> case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
> error = 1;
> + /* fall through */
> case UNSOL_DATA_NOTIFY:
> pasync_handle = pasync_ctx->async_entry[ci].data;
> break;
>

2018-12-19 16:10:18

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "!!! fall through !!!"
> with a "fall through" annotation, which is what GCC is expecting to
> find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
> index b4f2c1d8742e..646f09f66443 100644
> --- a/drivers/scsi/bfa/bfa_fcs_lport.c
> +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
> @@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
> switch (event) {
> case BFA_FCS_VPORT_SM_OFFLINE:
> bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
> - /*
> - * !!! fall through !!!
> - */
> + /* fall through */
>
> case BFA_FCS_VPORT_SM_RSP_OK:
> case BFA_FCS_VPORT_SM_RSP_ERROR:
> @@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
> switch (event) {
> case BFA_FCS_VPORT_SM_OFFLINE:
> bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
> - /*
> - * !!! fall through !!!
> - */
> + /* fall through */
>
> case BFA_FCS_VPORT_SM_RSP_OK:
> case BFA_FCS_VPORT_SM_RSP_ERROR:
>

2018-12-19 16:11:35

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 11/41] scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that I replaced "!! fall through !!" and "!!! fall through !!!"
> comments with "fall through" annotations, which is what GCC is
> expecting to find.
>
> Addresses-Coverity-ID: 744899 ("Missing break in switch")
> Addresses-Coverity-ID: 744900 ("Missing break in switch")
> Addresses-Coverity-ID: 744901 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
> index de50349a39ce..1e400f2aaece 100644
> --- a/drivers/scsi/bfa/bfa_fcs_rport.c
> +++ b/drivers/scsi/bfa/bfa_fcs_rport.c
> @@ -427,17 +427,13 @@ bfa_fcs_rport_sm_plogi(struct bfa_fcs_rport_s *rport, enum rport_event event)
>
> case RPSM_EVENT_LOGO_RCVD:
> bfa_fcs_rport_send_logo_acc(rport);
> - /*
> - * !! fall through !!
> - */
> + /* fall through */
> case RPSM_EVENT_PRLO_RCVD:
> if (rport->prlo == BFA_TRUE)
> bfa_fcs_rport_send_prlo_acc(rport);
>
> bfa_fcxp_discard(rport->fcxp);
> - /*
> - * !! fall through !!
> - */
> + /* fall through */
> case RPSM_EVENT_FAILED:
> if (rport->plogi_retries < BFA_FCS_RPORT_MAX_RETRIES) {
> rport->plogi_retries++;
> @@ -868,9 +864,7 @@ bfa_fcs_rport_sm_adisc_online(struct bfa_fcs_rport_s *rport,
> * At least go offline when a PLOGI is received.
> */
> bfa_fcxp_discard(rport->fcxp);
> - /*
> - * !!! fall through !!!
> - */
> + /* fall through */
>
> case RPSM_EVENT_FAILED:
> case RPSM_EVENT_ADDRESS_CHANGE:
> @@ -1056,6 +1050,7 @@ bfa_fcs_rport_sm_fc4_logosend(struct bfa_fcs_rport_s *rport,
>
> case RPSM_EVENT_LOGO_RCVD:
> bfa_fcs_rport_send_logo_acc(rport);
> + /* fall through */
> case RPSM_EVENT_PRLO_RCVD:
> if (rport->prlo == BFA_TRUE)
> bfa_fcs_rport_send_prlo_acc(rport);
> @@ -1144,9 +1139,7 @@ bfa_fcs_rport_sm_hcb_offline(struct bfa_fcs_rport_s *rport,
> bfa_fcs_rport_send_plogiacc(rport, NULL);
> break;
> }
> - /*
> - * !! fall through !!
> - */
> + /* fall through */
>
> case RPSM_EVENT_ADDRESS_CHANGE:
> if (!bfa_fcs_lport_is_online(rport->port)) {
> @@ -1303,6 +1296,7 @@ bfa_fcs_rport_sm_hcb_logosend(struct bfa_fcs_rport_s *rport,
>
> case RPSM_EVENT_LOGO_RCVD:
> bfa_fcs_rport_send_logo_acc(rport);
> + /* fall through */
> case RPSM_EVENT_PRLO_RCVD:
> if (rport->prlo == BFA_TRUE)
> bfa_fcs_rport_send_prlo_acc(rport);
> @@ -1346,6 +1340,7 @@ bfa_fcs_rport_sm_logo_sending(struct bfa_fcs_rport_s *rport,
>
> case RPSM_EVENT_LOGO_RCVD:
> bfa_fcs_rport_send_logo_acc(rport);
> + /* fall through */
> case RPSM_EVENT_PRLO_RCVD:
> if (rport->prlo == BFA_TRUE)
> bfa_fcs_rport_send_prlo_acc(rport);
>

2018-12-19 16:13:25

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 12/41] scsi: bfa: bfa_ioc: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "!!! fall through !!!"
> comment with "fall through" annotations, which is what GCC is expecting
> to find.
>
> Addresses-Coverity-ID: 146155 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/bfa/bfa_ioc.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
> index 16d3aeb0e572..32b24e51cce6 100644
> --- a/drivers/scsi/bfa/bfa_ioc.c
> +++ b/drivers/scsi/bfa/bfa_ioc.c
> @@ -978,9 +978,7 @@ bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
>
> case IOCPF_E_INITFAIL:
> bfa_iocpf_timer_stop(ioc);
> - /*
> - * !!! fall through !!!
> - */
> + /* fall through */
>
> case IOCPF_E_TIMEOUT:
> writel(1, ioc->ioc_regs.ioc_sem_reg);
> @@ -1056,9 +1054,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
>
> case IOCPF_E_FAIL:
> bfa_iocpf_timer_stop(ioc);
> - /*
> - * !!! fall through !!!
> - */
> + /* fall through */
>
> case IOCPF_E_TIMEOUT:
> bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
> @@ -6007,6 +6003,7 @@ bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf,
> case BFA_DCONF_SM_IOCDISABLE:
> case BFA_DCONF_SM_FLASH_COMP:
> bfa_timer_stop(&dconf->timer);
> + /* fall through */
> case BFA_DCONF_SM_TIMEOUT:
> bfa_sm_set_state(dconf, bfa_dconf_sm_uninit);
> bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE);
>

2018-12-19 16:14:26

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 13/41] scsi: csiostor: csio_wr: mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1056538 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/csiostor/csio_wr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
> index dc12933533d5..b6861ea66c9f 100644
> --- a/drivers/scsi/csiostor/csio_wr.c
> +++ b/drivers/scsi/csiostor/csio_wr.c
> @@ -808,6 +808,7 @@ csio_wr_destroy_queues(struct csio_hw *hw, bool cmd)
>
> csio_q_eqid(hw, i) = CSIO_MAX_QID;
> }
> + /* fall through */
> case CSIO_INGRESS:
> if (csio_q_iqid(hw, i) != CSIO_MAX_QID) {
> csio_wr_cleanup_iq_ftr(hw, i);
>

2018-12-19 17:38:33

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 07/41] scsi: be2iscsi: be_iscsi: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/be2iscsi/be_iscsi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
> index 96b96e2ab91a..ed1bd369baa0 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -679,6 +679,7 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
> case ISCSI_PARAM_MAX_XMIT_DLENGTH:
> if (conn->max_xmit_dlength > 65536)
> conn->max_xmit_dlength = 65536;
> + /* fall through */
> default:
> return 0;
> }
>

2018-12-19 17:38:37

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 09/41] scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that I replaced "Fall through !!!" with a "fall through"
> annotation, which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114971 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/bfa/bfa_fcpim.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
> index 2c85f5b1f9c1..7e996bcf026c 100644
> --- a/drivers/scsi/bfa/bfa_fcpim.c
> +++ b/drivers/scsi/bfa/bfa_fcpim.c
> @@ -2586,6 +2586,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
> case FCP_IODIR_RW:
> bfa_stats(itnim, input_reqs);
> bfa_stats(itnim, output_reqs);
> + /* fall through */
> default:
> bfi_h2i_set(m->mh, BFI_MC_IOIM_IO, 0, bfa_fn_lpu(ioim->bfa));
> }
> @@ -2820,6 +2821,7 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
>
> case BFI_IOIM_STS_TIMEDOUT:
> bfa_stats(ioim->itnim, iocomp_timedout);
> + /* fall through */
> case BFI_IOIM_STS_ABORTED:
> rsp->io_status = BFI_IOIM_STS_ABORTED;
> bfa_stats(ioim->itnim, iocomp_aborted);
> @@ -3215,9 +3217,7 @@ bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
> switch (event) {
> case BFA_TSKIM_SM_DONE:
> bfa_reqq_wcancel(&tskim->reqq_wait);
> - /*
> - * Fall through !!!
> - */
> + /* fall through */
> case BFA_TSKIM_SM_QRESUME:
> bfa_sm_set_state(tskim, bfa_tskim_sm_cleanup);
> bfa_tskim_send_abort(tskim);
>

2018-12-19 17:39:23

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 14/41] scsi: esas2r: esas2r_init: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/esas2r/esas2r_init.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
> index 46b2c83ba21f..950cd92df2ff 100644
> --- a/drivers/scsi/esas2r/esas2r_init.c
> +++ b/drivers/scsi/esas2r/esas2r_init.c
> @@ -1241,6 +1241,7 @@ static bool esas2r_format_init_msg(struct esas2r_adapter *a,
> a->init_msg = ESAS2R_INIT_MSG_GET_INIT;
> break;
> }
> + /* fall through */
>
> case ESAS2R_INIT_MSG_GET_INIT:
> if (msg == ESAS2R_INIT_MSG_GET_INIT) {
> @@ -1254,7 +1255,7 @@ static bool esas2r_format_init_msg(struct esas2r_adapter *a,
> esas2r_hdebug("FAILED");
> }
> }
> - /* fall through */
> + /* fall through */
>
> default:
> rq->req_stat = RS_SUCCESS;
>

2018-12-19 22:45:12

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 20/41] scsi: isci: request: mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:30 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, a dash is added as a token in
> order to separate the "Fall through" annotation from the rest of the
> comment on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/isci/request.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
> index 2f151708b59a..1b18cf55167e 100644
> --- a/drivers/scsi/isci/request.c
> +++ b/drivers/scsi/isci/request.c
> @@ -894,7 +894,7 @@ sci_io_request_terminate(struct isci_request *ireq)
> * and don't wait for the task response.
> */
> sci_change_state(&ireq->sm, SCI_REQ_ABORTING);
> - /* Fall through and handle like ABORTING... */
> + /* Fall through - and handle like ABORTING... */
> case SCI_REQ_ABORTING:
> if (!isci_remote_device_is_safe_to_abort(ireq->target_device))
> set_bit(IREQ_PENDING_ABORT, &ireq->flags);
>

2018-12-19 22:45:48

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 24/41] scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Drop thru" with a
> "fall through" annotation, which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114976 ("Missing break in switch")
> Addresses-Coverity-ID: 114977 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
> index 6c2fb55d739b..1a61806739ff 100644
> --- a/drivers/scsi/lpfc/lpfc_hbadisc.c
> +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
> @@ -4645,9 +4645,11 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba,
> case CMD_GEN_REQUEST64_CR:
> if (iocb->context_un.ndlp == ndlp)
> return 1;
> + /* fall through */
> case CMD_ELS_REQUEST64_CR:
> if (icmd->un.elsreq64.remoteID == ndlp->nlp_DID)
> return 1;
> + /* fall through */
> case CMD_XMIT_ELS_RSP64_CX:
> if (iocb->context1 == (uint8_t *) ndlp)
> return 1;
> @@ -5791,7 +5793,7 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport)
>
> case LPFC_LINK_UP:
> lpfc_issue_clear_la(phba, vport);
> - /* Drop thru */
> + /* fall through */
> case LPFC_LINK_UNKNOWN:
> case LPFC_WARM_START:
> case LPFC_INIT_START:
>

2018-12-19 22:45:53

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 25/41] scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_nportdisc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
> index 7d5693cfaa87..e8583496feaf 100644
> --- a/drivers/scsi/lpfc/lpfc_nportdisc.c
> +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
> @@ -360,6 +360,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
> case NLP_STE_NPR_NODE:
> if (!(ndlp->nlp_flag & NLP_NPR_ADISC))
> break;
> + /* fall through */
> case NLP_STE_REG_LOGIN_ISSUE:
> case NLP_STE_PRLI_ISSUE:
> case NLP_STE_UNMAPPED_NODE:
>

2018-12-19 22:46:02

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 28/41] scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Drop thru" and
> "Fall Thru" with "fall through" annotations, which is what GCC
> is expecting to find.
>
> Also, in some cases a dash is added as a token in order to separate
> the "fall through" annotation from the rest of the comment on the
> same line, which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114979 ("Missing break in switch")
> Addresses-Coverity-ID: 114980 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 3912a2d0b95d..cbcda5a91068 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -9334,6 +9334,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
> cmnd = CMD_XMIT_SEQUENCE64_CR;
> if (phba->link_flag & LS_LOOPBACK_MODE)
> bf_set(wqe_xo, &wqe->xmit_sequence.wge_ctl, 1);
> + /* fall through */
> case CMD_XMIT_SEQUENCE64_CR:
> /* word3 iocb=io_tag32 wqe=reserved */
> wqe->xmit_sequence.rsvd3 = 0;
> @@ -13460,6 +13461,7 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe)
> case FC_STATUS_RQ_BUF_LEN_EXCEEDED:
> lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
> "2537 Receive Frame Truncated!!\n");
> + /* fall through */
> case FC_STATUS_RQ_SUCCESS:
> spin_lock_irqsave(&phba->hbalock, iflags);
> lpfc_sli4_rq_release(hrq, drq);
> @@ -13859,7 +13861,7 @@ lpfc_sli4_nvmet_handle_rcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
> case FC_STATUS_RQ_BUF_LEN_EXCEEDED:
> lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
> "6126 Receive Frame Truncated!!\n");
> - /* Drop thru */
> + /* fall through */
> case FC_STATUS_RQ_SUCCESS:
> spin_lock_irqsave(&phba->hbalock, iflags);
> lpfc_sli4_rq_release(hrq, drq);
> @@ -14769,7 +14771,7 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax)
> eq->entry_count);
> if (eq->entry_count < 256)
> return -EINVAL;
> - /* otherwise default to smallest count (drop through) */
> + /* fall through - otherwise default to smallest count */
> case 256:
> bf_set(lpfc_eq_context_count, &eq_create->u.request.context,
> LPFC_EQ_CNT_256);
> @@ -14899,7 +14901,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
> LPFC_CQ_CNT_WORD7);
> break;
> }
> - /* Fall Thru */
> + /* fall through */
> default:
> lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
> "0361 Unsupported CQ count: "
> @@ -14910,7 +14912,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
> status = -EINVAL;
> goto out;
> }
> - /* otherwise default to smallest count (drop through) */
> + /* fall through - otherwise default to smallest count */
> case 256:
> bf_set(lpfc_cq_context_count, &cq_create->u.request.context,
> LPFC_CQ_CNT_256);
> @@ -15070,7 +15072,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
> LPFC_CQ_CNT_WORD7);
> break;
> }
> - /* Fall Thru */
> + /* fall through */
> default:
> lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
> "3118 Bad CQ count. (%d)\n",
> @@ -15079,7 +15081,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
> status = -EINVAL;
> goto out;
> }
> - /* otherwise default to smallest (drop thru) */
> + /* fall through - otherwise default to smallest */
> case 256:
> bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
> &cq_set->u.request, LPFC_CQ_CNT_256);
> @@ -15351,7 +15353,7 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq,
> status = -EINVAL;
> goto out;
> }
> - /* otherwise default to smallest count (drop through) */
> + /* fall through - otherwise default to smallest count */
> case 16:
> bf_set(lpfc_mq_context_ring_size,
> &mq_create_ext->u.request.context,
> @@ -15770,7 +15772,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
> status = -EINVAL;
> goto out;
> }
> - /* otherwise default to smallest count (drop through) */
> + /* fall through - otherwise default to smallest count */
> case 512:
> bf_set(lpfc_rq_context_rqe_count,
> &rq_create->u.request.context,
> @@ -15907,7 +15909,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
> status = -EINVAL;
> goto out;
> }
> - /* otherwise default to smallest count (drop through) */
> + /* fall through - otherwise default to smallest count */
> case 512:
> bf_set(lpfc_rq_context_rqe_count,
> &rq_create->u.request.context,
>

2018-12-19 22:51:25

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 19/41] scsi: isci: remote_node_context: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:30 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, a dash is added as a token in
> order to separate the "Fall through" annotations from the rest of
> the comment on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/isci/remote_node_context.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c
> index e3f2a5359d71..474a43460963 100644
> --- a/drivers/scsi/isci/remote_node_context.c
> +++ b/drivers/scsi/isci/remote_node_context.c
> @@ -601,9 +601,9 @@ enum sci_status sci_remote_node_context_suspend(
> __func__, sci_rnc);
> return SCI_FAILURE_INVALID_STATE;
> }
> - /* Fall through and handle like SCI_RNC_POSTING */
> + /* Fall through - and handle like SCI_RNC_POSTING */
> case SCI_RNC_RESUMING:
> - /* Fall through and handle like SCI_RNC_POSTING */
> + /* Fall through - and handle like SCI_RNC_POSTING */
> case SCI_RNC_POSTING:
> /* Set the destination state to AWAIT - this signals the
> * entry into the SCI_RNC_READY state that a suspension
>

2018-12-19 22:51:25

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 16/41] scsi: imm: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:29 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I placed all the "Phase N - ..."
> comments on the same line as its corresponding switch case. The same
> way in which similar comments appear in drivers/scsi/ppa.c. This makes
> it possible to place the "fall through" annotations at the bottom of
> each switch case, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/imm.c | 33 +++++++++++++++++----------------
> 1 file changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
> index 8c6627bc8a39..629e0bc70d3e 100644
> --- a/drivers/scsi/imm.c
> +++ b/drivers/scsi/imm.c
> @@ -796,21 +796,21 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> return 0;
> }
> return 1; /* wait until imm_wakeup claims parport */
> - /* Phase 1 - Connected */
> - case 1:
> +
> + case 1: /* Phase 1 - Connected */
> imm_connect(dev, CONNECT_EPP_MAYBE);
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 2 - We are now talking to the scsi bus */
> - case 2:
> + case 2: /* Phase 2 - We are now talking to the scsi bus */
> if (!imm_select(dev, scmd_id(cmd))) {
> imm_fail(dev, DID_NO_CONNECT);
> return 0;
> }
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 3 - Ready to accept a command */
> - case 3:
> + case 3: /* Phase 3 - Ready to accept a command */
> w_ctr(ppb, 0x0c);
> if (!(r_str(ppb) & 0x80))
> return 1;
> @@ -818,9 +818,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> if (!imm_send_command(cmd))
> return 0;
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 4 - Setup scatter/gather buffers */
> - case 4:
> + case 4: /* Phase 4 - Setup scatter/gather buffers */
> if (scsi_bufflen(cmd)) {
> cmd->SCp.buffer = scsi_sglist(cmd);
> cmd->SCp.this_residual = cmd->SCp.buffer->length;
> @@ -834,8 +834,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> cmd->SCp.phase++;
> if (cmd->SCp.this_residual & 0x01)
> cmd->SCp.this_residual++;
> - /* Phase 5 - Pre-Data transfer stage */
> - case 5:
> + /* fall through */
> +
> + case 5: /* Phase 5 - Pre-Data transfer stage */
> /* Spin lock for BUSY */
> w_ctr(ppb, 0x0c);
> if (!(r_str(ppb) & 0x80))
> @@ -850,9 +851,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> if (imm_negotiate(dev))
> return 0;
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 6 - Data transfer stage */
> - case 6:
> + case 6: /* Phase 6 - Data transfer stage */
> /* Spin lock for BUSY */
> w_ctr(ppb, 0x0c);
> if (!(r_str(ppb) & 0x80))
> @@ -866,9 +867,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> return 1;
> }
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 7 - Post data transfer stage */
> - case 7:
> + case 7: /* Phase 7 - Post data transfer stage */
> if ((dev->dp) && (dev->rd)) {
> if ((dev->mode == IMM_NIBBLE) || (dev->mode == IMM_PS2)) {
> w_ctr(ppb, 0x4);
> @@ -878,9 +879,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> }
> }
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 8 - Read status/message */
> - case 8:
> + case 8: /* Phase 8 - Read status/message */
> /* Check for data overrun */
> if (imm_wait(dev) != (unsigned char) 0xb8) {
> imm_fail(dev, DID_ERROR);
>

2018-12-19 22:51:30

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 22/41] scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_ct.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
> index 6305ffeba7ea..b2b7fcc23654 100644
> --- a/drivers/scsi/lpfc/lpfc_ct.c
> +++ b/drivers/scsi/lpfc/lpfc_ct.c
> @@ -3050,6 +3050,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
> case SLI_MGMT_GHAT:
> case SLI_MGMT_GRPL:
> rsp_size = FC_MAX_NS_RSP;
> + /* fall through */
> case SLI_MGMT_DHBA:
> case SLI_MGMT_DHAT:
> pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID;
> @@ -3062,6 +3063,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
> case SLI_MGMT_GPAT:
> case SLI_MGMT_GPAS:
> rsp_size = FC_MAX_NS_RSP;
> + /* fall through */
> case SLI_MGMT_DPRT:
> case SLI_MGMT_DPA:
> pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID;
>

2018-12-19 22:52:47

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 26/41] scsi: lpfc: lpfc_nvme: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_nvme.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
> index ba831def9301..942fe58c433d 100644
> --- a/drivers/scsi/lpfc/lpfc_nvme.c
> +++ b/drivers/scsi/lpfc/lpfc_nvme.c
> @@ -1115,6 +1115,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
> lpfc_ncmd, nCmd,
> lpfc_ncmd->cur_iocbq.sli4_xritag,
> bf_get(lpfc_wcqe_c_xb, wcqe));
> + /* fall through */
> default:
> out_err:
> lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
>

2018-12-20 01:06:06

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 17/41] scsi: isci: phy: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:29 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 703127 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/isci/phy.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
> index 1deca8c5a94f..7f9b3f20e5e4 100644
> --- a/drivers/scsi/isci/phy.c
> +++ b/drivers/scsi/isci/phy.c
> @@ -778,6 +778,7 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
> break;
> case SCU_EVENT_LINK_FAILURE:
> scu_link_layer_set_txcomsas_timeout(iphy, SCU_SAS_LINK_LAYER_TXCOMSAS_NEGTIME_DEFAULT);
> + /* fall through */
> case SCU_EVENT_HARD_RESET_RECEIVED:
> /* Start the oob/sn state machine over again */
> sci_change_state(&iphy->sm, SCI_PHY_STARTING);
>

2018-12-20 01:06:12

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 18/41] scsi: isci: remote_device: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:30 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, a dash is added as a token in
> order to separate the "fall through" annotations from the rest of
> the comment on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/isci/remote_device.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
> index cc51f38b116d..9d29edb9f590 100644
> --- a/drivers/scsi/isci/remote_device.c
> +++ b/drivers/scsi/isci/remote_device.c
> @@ -310,7 +310,7 @@ static void isci_remote_device_not_ready(struct isci_host *ihost,
> /* Kill all outstanding requests for the device. */
> sci_remote_device_terminate_requests(idev);
>
> - /* Fall through into the default case... */
> + /* Fall through - into the default case... */
> default:
> clear_bit(IDEV_IO_READY, &idev->flags);
> break;
> @@ -593,7 +593,7 @@ enum sci_status sci_remote_device_event_handler(struct isci_remote_device *idev,
>
> break;
> }
> - /* Else, fall through and treat as unhandled... */
> + /* fall through - and treat as unhandled... */
> default:
> dev_dbg(scirdev_to_dev(idev),
> "%s: device: %p event code: %x: %s\n",
>

2018-12-20 01:57:26

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 32/41] scsi: myrb: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1465234 ("Missing break in switch")
> Addresses-Coverity-ID: 1465238 ("Missing break in switch")
> Addresses-Coverity-ID: 1465242 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/myrb.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
> index 0642f2d0a3bb..539ac8ce4fcd 100644
> --- a/drivers/scsi/myrb.c
> +++ b/drivers/scsi/myrb.c
> @@ -1528,6 +1528,7 @@ static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
> scmd->scsi_done(scmd);
> return 0;
> }
> + /* fall through */
> case WRITE_6:
> lba = (((scmd->cmnd[1] & 0x1F) << 16) |
> (scmd->cmnd[2] << 8) |
> @@ -1544,6 +1545,7 @@ static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
> scmd->scsi_done(scmd);
> return 0;
> }
> + /* fall through */
> case WRITE_10:
> case VERIFY: /* 0x2F */
> case WRITE_VERIFY: /* 0x2E */
> @@ -1560,6 +1562,7 @@ static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
> scmd->scsi_done(scmd);
> return 0;
> }
> + /* fall through */
> case WRITE_12:
> case VERIFY_12: /* 0xAF */
> case WRITE_VERIFY_12: /* 0xAE */
>

2018-12-20 01:58:01

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 33/41] scsi: osd: osd_initiator: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/osd/osd_initiator.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
> index 60cf7c5eb880..cb26f26d5ec1 100644
> --- a/drivers/scsi/osd/osd_initiator.c
> +++ b/drivers/scsi/osd/osd_initiator.c
> @@ -1849,6 +1849,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
> 32, 1, dump, sizeof(dump), true);
> OSD_SENSE_PRINT2("response_integrity [%s]\n", dump);
> }
> + /* fall through */
> case osd_sense_attribute_identification:
> {
> struct osd_sense_attributes_data_descriptor
> @@ -1879,7 +1880,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
> attr_page, attr_id);
> }
> }
> - /*These are not legal for OSD*/
> + /* fall through - These are not legal for OSD */
> case scsi_sense_field_replaceable_unit:
> OSD_SENSE_PRINT2("scsi_sense_field_replaceable_unit\n");
> break;
>

2018-12-20 01:59:14

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 34/41] scsi: osst: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 114983 ("Missing break in switch")
> Addresses-Coverity-ID: 114984 ("Missing break in switch")
> Addresses-Coverity-ID: 114985 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/osst.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
> index 664c1238a87f..7e877b43785d 100644
> --- a/drivers/scsi/osst.c
> +++ b/drivers/scsi/osst.c
> @@ -216,12 +216,14 @@ static void osst_analyze_sense(struct osst_request *SRpnt, struct st_cmdstatus *
> 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);
> @@ -591,6 +593,7 @@ static void osst_init_aux(struct osst_tape * STp, int frame_type, int frame_seq_
> dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER?
> OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA;
> dat->dat_list[0].reserved = 0;
> + /* fall through */
> case OS_FRAME_TYPE_EOD:
> aux->update_frame_cntr = htonl(0);
> par->partition_num = OS_DATA_PARTITION;
> @@ -4086,6 +4089,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
> switch (cmd_in) {
> case MTFSFM:
> chg_eof = 0; /* Changed from the FSF after this */
> + /* fall through */
> case MTFSF:
> if (STp->raw)
> return (-EIO);
> @@ -4101,6 +4105,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
>
> case MTBSF:
> chg_eof = 0; /* Changed from the FSF after this */
> + /* fall through */
> case MTBSFM:
> if (STp->raw)
> return (-EIO);
> @@ -4312,6 +4317,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
> name, STp->block_size);
> return 0;
> }
> + /* fall through */
> case MTSETDENSITY: /* Set tape density */
> case MTSETDRVBUFFER: /* Set drive buffering */
> case SET_DENS_AND_BLK: /* Set density and block size */
>

2018-12-20 02:01:56

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 37/41] scsi: st: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
> 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 <[email protected]>
> ---
> 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 */
>

2018-12-20 02:03:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 39/41] scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/sym53c8xx_2/sym_nvram.c b/drivers/scsi/sym53c8xx_2/sym_nvram.c
> index 5662fbb3ff60..0d37b4f07b5e 100644
> --- a/drivers/scsi/sym53c8xx_2/sym_nvram.c
> +++ b/drivers/scsi/sym53c8xx_2/sym_nvram.c
> @@ -708,6 +708,7 @@ static int sym_read_Tekram_nvram (struct sym_device *np, Tekram_nvram *nvram)
> data, len);
> if (!x)
> break;
> + /* fall through */
> default:
> x = sym_read_T93C46_nvram(np, nvram);
> break;
>

2018-12-20 02:03:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 38/41] scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 114996 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
> index 0a2a54517b15..054fb0599263 100644
> --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
> +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
> @@ -3072,6 +3072,7 @@ static void sym_sir_bad_scsi_status(struct sym_hcb *np, int num, struct sym_ccb
> sym_print_addr(cp->cmd, "%s\n",
> s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n");
> }
> + /* fall through */
> default: /* S_INT, S_INT_COND_MET, S_CONFLICT */
> sym_complete_error (np, cp);
> break;
> @@ -4632,6 +4633,7 @@ static void sym_int_sir(struct sym_hcb *np)
> * Negotiation failed.
> * Target does not want answer message.
> */
> + /* fall through */
> case SIR_NEGO_PROTO:
> sym_nego_default(np, tp, cp);
> goto out;
>

2018-12-20 03:17:13

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 27/41] scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Drop thru" with
> "fall through" annotations, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index baed2b891efb..0eeed6c4c2ee 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -1427,7 +1427,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
>
> break;
> }
> - /* Drop thru */
> + /* fall through */
> case SCSI_PROT_WRITE_INSERT:
> /*
> * For WRITE_INSERT, force the error
> @@ -1546,7 +1546,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
> rc = BG_ERR_TGT | BG_ERR_CHECK;
> break;
> }
> - /* Drop thru */
> + /* fall through */
> case SCSI_PROT_WRITE_INSERT:
> /*
> * For WRITE_INSERT, force the
> @@ -1628,7 +1628,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
> switch (op) {
> case SCSI_PROT_WRITE_PASS:
> rc = BG_ERR_CHECK;
> - /* Drop thru */
> + /* fall through */
>
> case SCSI_PROT_WRITE_INSERT:
> /*
> @@ -4115,7 +4115,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
> lpfc_cmd->cur_iocbq.sli4_lxritag,
> 0, 0);
> }
> - /* else: fall through */
> + /* fall through */
> default:
> cmd->result = DID_ERROR << 16;
> break;
>

2018-12-20 03:17:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 23/41] scsi: lpfc: lpfc_els: Mark expected switch fall-throughs

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 114978 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_els.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index 5c34bfa624ef..1f20c35e0f84 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -8649,6 +8649,7 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
> lpfc_nlp_put(ndlp);
> return;
> }
> + /* fall through */
>
> default:
> /* Try to recover from this error */
>

2018-12-20 03:19:28

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 31/41] scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1475400 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 5b9806d0719e..920b80ce4748 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -10370,6 +10370,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> case MPI26_MFGPAGE_DEVID_CFG_SEC_3916:
> dev_info(&pdev->dev,
> "HBA is in Configurable Secure mode\n");
> + /* fall through */
> case MPI26_MFGPAGE_DEVID_SAS3508:
> case MPI26_MFGPAGE_DEVID_SAS3508_1:
> case MPI26_MFGPAGE_DEVID_SAS3408:
>

2018-12-20 03:20:49

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 35/41] scsi: ppa: mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 114988 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/ppa.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
> index ee86a0c62dbf..d29999ba5458 100644
> --- a/drivers/scsi/ppa.c
> +++ b/drivers/scsi/ppa.c
> @@ -717,6 +717,7 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
> }
> cmd->SCp.phase++;
> }
> + /* fall through */
>
> case 2: /* Phase 2 - We are now talking to the scsi bus */
> if (!ppa_select(dev, scmd_id(cmd))) {
>

2018-12-20 03:21:14

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 36/41] scsi: qla4xxx: ql4_os: mark expected switch fall-through

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "allow fall-through"
> with a "fall through" annotation, which is what GCC is expecting to
> find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/qla4xxx/ql4_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 1c702cd22359..7fd3491ea2d9 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -2876,7 +2876,7 @@ static int qla4xxx_session_get_param(struct iscsi_cls_session *cls_sess,
> chap_tbl.secret_len);
> }
> }
> - /* allow fall-through */
> + /* fall through */
> default:
> return iscsi_session_get_param(cls_sess, param, buf);
> }
>

2018-12-20 07:46:37

by Suganath Prabu S

[permalink] [raw]
Subject: Re: [PATCH 31/41] scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through

Hi Gustavo,

This patch may not apply smoothly over 4.21/scsi-queue.
Our previous patch for Aero had some changes in this switch case.
Can you resend this patch with latest code base ?

Thanks,
Suganath prabu


On Thu, Dec 20, 2018 at 5:37 AM Gustavo A. R. Silva
<[email protected]> wrote:
>
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > where we are expecting to fall through.
> >
> > Addresses-Coverity-ID: 1475400 ("Missing break in switch")
> > Signed-off-by: Gustavo A. R. Silva <[email protected]>
> > ---
> > drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> > index 5b9806d0719e..920b80ce4748 100644
> > --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> > +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> > @@ -10370,6 +10370,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> > case MPI26_MFGPAGE_DEVID_CFG_SEC_3916:
> > dev_info(&pdev->dev,
> > "HBA is in Configurable Secure mode\n");
> > + /* fall through */
> > case MPI26_MFGPAGE_DEVID_SAS3508:
> > case MPI26_MFGPAGE_DEVID_SAS3508_1:
> > case MPI26_MFGPAGE_DEVID_SAS3408:
> >

2018-12-20 08:27:03

by Hannes Reinecke

[permalink] [raw]
Subject: Re: [PATCH 32/41] scsi: myrb: Mark expected switch fall-throughs

On 12/20/18 1:07 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 1465234 ("Missing break in switch")
>> Addresses-Coverity-ID: 1465238 ("Missing break in switch")
>> Addresses-Coverity-ID: 1465242 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/myrb.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes


2018-12-20 08:52:35

by Artur Paszkiewicz

[permalink] [raw]
Subject: Re: [PATCH 17/41] scsi: isci: phy: Mark expected switch fall-through

On 11/28/18 5:29 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 703127 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Artur Paszkiewicz <[email protected]>

2018-12-20 08:52:46

by Artur Paszkiewicz

[permalink] [raw]
Subject: Re: [PATCH 20/41] scsi: isci: request: mark expected switch fall-through

On 11/28/18 5:30 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, a dash is added as a token in
> order to separate the "Fall through" annotation from the rest of the
> comment on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Artur Paszkiewicz <[email protected]>

2018-12-20 08:53:05

by Artur Paszkiewicz

[permalink] [raw]
Subject: Re: [PATCH 19/41] scsi: isci: remote_node_context: mark expected switch fall-throughs

On 11/28/18 5:30 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, a dash is added as a token in
> order to separate the "Fall through" annotations from the rest of
> the comment on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Artur Paszkiewicz <[email protected]>

2018-12-20 10:41:45

by Artur Paszkiewicz

[permalink] [raw]
Subject: Re: [PATCH 18/41] scsi: isci: remote_device: Mark expected switch fall-throughs

On 11/28/18 5:30 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, a dash is added as a token in
> order to separate the "fall through" annotations from the rest of
> the comment on the same line, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Artur Paszkiewicz <[email protected]>

2018-12-20 20:57:59

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 31/41] scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through

Hi Suganath,

On 12/19/18 10:19 PM, Suganath Prabu Subramani wrote:
> Hi Gustavo,
>
> This patch may not apply smoothly over 4.21/scsi-queue.
> Our previous patch for Aero had some changes in this switch case.
> Can you resend this patch with latest code base ?
>

Okay. I'll send a separate patch.

Thanks for the feedback.
--
Gustavo

2018-12-21 08:04:04

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 32/41] scsi: myrb: Mark expected switch fall-throughs


Gustavo A.,

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

Applied to 4.21/scsi-queue. Thanks.

--
Martin K. Petersen Oracle Linux Engineering

2018-12-21 12:09:09

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 17/41] scsi: isci: phy: Mark expected switch fall-through


Artur,

> On 11/28/18 5:29 AM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 703127 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>
> Acked-by: Artur Paszkiewicz <[email protected]>

Applied the 4 isci patches to 4.21/scsi-queue. Thanks!

--
Martin K. Petersen Oracle Linux Engineering

2018-12-24 09:04:04

by Nilesh Javali

[permalink] [raw]
Subject: Re: [PATCH 36/41] scsi: qla4xxx: ql4_os: mark expected switch fall-through


On 11/28/18, 10:03 AM, "[email protected] on behalf of
Gustavo A. R. Silva" <[email protected] on behalf of
[email protected]> wrote:

>External Email
>
>In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>where we are expecting to fall through.
>
>Notice that, in this particular case, I replaced "allow fall-through"
>with a "fall through" annotation, which is what GCC is expecting to
>find.
>
>Signed-off-by: Gustavo A. R. Silva <[email protected]>
>---
> drivers/scsi/qla4xxx/ql4_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
>index 1c702cd22359..7fd3491ea2d9 100644
>--- a/drivers/scsi/qla4xxx/ql4_os.c
>+++ b/drivers/scsi/qla4xxx/ql4_os.c
>@@ -2876,7 +2876,7 @@ static int qla4xxx_session_get_param(struct
>iscsi_cls_session *cls_sess,
> chap_tbl.secret_len);
> }
> }
>- /* allow fall-through */
>+ /* fall through */
> default:
> return iscsi_session_get_param(cls_sess, param, buf);
> }
>--
>2.17.1

Thanks.
Acked-by: Nilesh Javali <[email protected]>


2019-01-04 08:08:41

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 28/41] scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs


Dick,

> Looks good.
> Ack

Applied to 4.21/scsi-fixes. Thanks, Gustavo.

--
Martin K. Petersen Oracle Linux Engineering

2019-01-10 21:13:46

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 38/41] scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 6:08 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 114996 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
>> index 0a2a54517b15..054fb0599263 100644
>> --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
>> +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
>> @@ -3072,6 +3072,7 @@ static void sym_sir_bad_scsi_status(struct sym_hcb *np, int num, struct sym_ccb
>>               sym_print_addr(cp->cmd, "%s\n",
>>                       s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n");
>>           }
>> +        /* fall through */
>>       default:    /* S_INT, S_INT_COND_MET, S_CONFLICT */
>>           sym_complete_error (np, cp);
>>           break;
>> @@ -4632,6 +4633,7 @@ static void sym_int_sir(struct sym_hcb *np)
>>        *  Negotiation failed.
>>        *  Target does not want answer message.
>>        */
>> +    /* fall through */
>>       case SIR_NEGO_PROTO:
>>           sym_nego_default(np, tp, cp);
>>           goto out;
>>

2019-01-10 21:13:47

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 37/41] scsi: st: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 6:08 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
>> 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 <[email protected]>
>> ---
>>   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 */
>>

2019-01-10 21:14:06

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 34/41] scsi: osst: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 6:07 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 114983 ("Missing break in switch")
>> Addresses-Coverity-ID: 114984 ("Missing break in switch")
>> Addresses-Coverity-ID: 114985 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/osst.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
>> index 664c1238a87f..7e877b43785d 100644
>> --- a/drivers/scsi/osst.c
>> +++ b/drivers/scsi/osst.c
>> @@ -216,12 +216,14 @@ static void osst_analyze_sense(struct osst_request *SRpnt, struct st_cmdstatus *
>>           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);
>> @@ -591,6 +593,7 @@ static void osst_init_aux(struct osst_tape * STp, int frame_type, int frame_seq_
>>           dat->dat_list[0].flags    = frame_type==OS_FRAME_TYPE_MARKER?
>>                               OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA;
>>           dat->dat_list[0].reserved = 0;
>> +        /* fall through */
>>         case    OS_FRAME_TYPE_EOD:
>>           aux->update_frame_cntr    = htonl(0);
>>           par->partition_num        = OS_DATA_PARTITION;
>> @@ -4086,6 +4089,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
>>       switch (cmd_in) {
>>        case MTFSFM:
>>           chg_eof = 0; /* Changed from the FSF after this */
>> +        /* fall through */
>>        case MTFSF:
>>           if (STp->raw)
>>              return (-EIO);
>> @@ -4101,6 +4105,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
>>        case MTBSF:
>>           chg_eof = 0; /* Changed from the FSF after this */
>> +        /* fall through */
>>        case MTBSFM:
>>           if (STp->raw)
>>              return (-EIO);
>> @@ -4312,6 +4317,7 @@ static int osst_int_ioctl(struct osst_tape * STp, struct osst_request ** aSRpnt,
>>                          name, STp->block_size);
>>                return 0;
>>            }
>> +        /* fall through */
>>        case MTSETDENSITY:       /* Set tape density */
>>        case MTSETDRVBUFFER:     /* Set drive buffering */
>>        case SET_DENS_AND_BLK:   /* Set density and block size */
>>

2019-01-10 21:14:06

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 33/41] scsi: osd: osd_initiator: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 6:07 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/osd/osd_initiator.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
>> index 60cf7c5eb880..cb26f26d5ec1 100644
>> --- a/drivers/scsi/osd/osd_initiator.c
>> +++ b/drivers/scsi/osd/osd_initiator.c
>> @@ -1849,6 +1849,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
>>                       32, 1, dump, sizeof(dump), true);
>>               OSD_SENSE_PRINT2("response_integrity [%s]\n", dump);
>>           }
>> +        /* fall through */
>>           case osd_sense_attribute_identification:
>>           {
>>               struct osd_sense_attributes_data_descriptor
>> @@ -1879,7 +1880,7 @@ int osd_req_decode_sense_full(struct osd_request *or,
>>                       attr_page, attr_id);
>>               }
>>           }
>> -        /*These are not legal for OSD*/
>> +        /* fall through - These are not legal for OSD */
>>           case scsi_sense_field_replaceable_unit:
>>               OSD_SENSE_PRINT2("scsi_sense_field_replaceable_unit\n");
>>               break;
>>

2019-01-10 21:14:26

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 39/41] scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 6:08 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:34 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/sym53c8xx_2/sym_nvram.c b/drivers/scsi/sym53c8xx_2/sym_nvram.c
>> index 5662fbb3ff60..0d37b4f07b5e 100644
>> --- a/drivers/scsi/sym53c8xx_2/sym_nvram.c
>> +++ b/drivers/scsi/sym53c8xx_2/sym_nvram.c
>> @@ -708,6 +708,7 @@ static int sym_read_Tekram_nvram (struct sym_device *np, Tekram_nvram *nvram)
>>                         data, len);
>>           if (!x)
>>               break;
>> +        /* fall through */
>>       default:
>>           x = sym_read_T93C46_nvram(np, nvram);
>>           break;
>>

2019-01-10 21:14:33

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 35/41] scsi: ppa: mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 6:07 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:33 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 114988 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/ppa.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
>> index ee86a0c62dbf..d29999ba5458 100644
>> --- a/drivers/scsi/ppa.c
>> +++ b/drivers/scsi/ppa.c
>> @@ -717,6 +717,7 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd)
>>               }
>>               cmd->SCp.phase++;
>>           }
>> +        /* fall through */
>>       case 2:        /* Phase 2 - We are now talking to the scsi bus */
>>           if (!ppa_select(dev, scmd_id(cmd))) {
>>

2019-01-10 21:15:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 26/41] scsi: lpfc: lpfc_nvme: Mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_nvme.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
> index ba831def9301..942fe58c433d 100644
> --- a/drivers/scsi/lpfc/lpfc_nvme.c
> +++ b/drivers/scsi/lpfc/lpfc_nvme.c
> @@ -1115,6 +1115,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
> lpfc_ncmd, nCmd,
> lpfc_ncmd->cur_iocbq.sli4_xritag,
> bf_get(lpfc_wcqe_c_xb, wcqe));
> + /* fall through */
> default:
> out_err:
> lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
>

2019-01-10 21:16:16

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 14/41] scsi: esas2r: esas2r_init: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/esas2r/esas2r_init.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/esas2r/esas2r_init.c b/drivers/scsi/esas2r/esas2r_init.c
>> index 46b2c83ba21f..950cd92df2ff 100644
>> --- a/drivers/scsi/esas2r/esas2r_init.c
>> +++ b/drivers/scsi/esas2r/esas2r_init.c
>> @@ -1241,6 +1241,7 @@ static bool esas2r_format_init_msg(struct esas2r_adapter *a,
>>               a->init_msg = ESAS2R_INIT_MSG_GET_INIT;
>>               break;
>>           }
>> +        /* fall through */
>>       case ESAS2R_INIT_MSG_GET_INIT:
>>           if (msg == ESAS2R_INIT_MSG_GET_INIT) {
>> @@ -1254,7 +1255,7 @@ static bool esas2r_format_init_msg(struct esas2r_adapter *a,
>>                   esas2r_hdebug("FAILED");
>>               }
>>           }
>> -    /* fall through */
>> +        /* fall through */
>>       default:
>>           rq->req_stat = RS_SUCCESS;
>>

2019-01-10 21:16:26

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 13/41] scsi: csiostor: csio_wr: mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Martin: apparently, the only maintainers for
this driver are you and James.

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 1056538 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/csiostor/csio_wr.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c
>> index dc12933533d5..b6861ea66c9f 100644
>> --- a/drivers/scsi/csiostor/csio_wr.c
>> +++ b/drivers/scsi/csiostor/csio_wr.c
>> @@ -808,6 +808,7 @@ csio_wr_destroy_queues(struct csio_hw *hw, bool cmd)
>>                   csio_q_eqid(hw, i) = CSIO_MAX_QID;
>>               }
>> +            /* fall through */
>>           case CSIO_INGRESS:
>>               if (csio_q_iqid(hw, i) != CSIO_MAX_QID) {
>>                   csio_wr_cleanup_iq_ftr(hw, i);
>>

2019-01-10 21:16:32

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 11/41] scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that I replaced "!! fall through !!" and "!!! fall through !!!"
>> comments with "fall through" annotations, which is what GCC is
>> expecting to find.
>>
>> Addresses-Coverity-ID: 744899 ("Missing break in switch")
>> Addresses-Coverity-ID: 744900 ("Missing break in switch")
>> Addresses-Coverity-ID: 744901 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
>>   1 file changed, 7 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
>> index de50349a39ce..1e400f2aaece 100644
>> --- a/drivers/scsi/bfa/bfa_fcs_rport.c
>> +++ b/drivers/scsi/bfa/bfa_fcs_rport.c
>> @@ -427,17 +427,13 @@ bfa_fcs_rport_sm_plogi(struct bfa_fcs_rport_s *rport, enum rport_event event)
>>       case RPSM_EVENT_LOGO_RCVD:
>>           bfa_fcs_rport_send_logo_acc(rport);
>> -        /*
>> -         * !! fall through !!
>> -         */
>> +        /* fall through */
>>       case RPSM_EVENT_PRLO_RCVD:
>>           if (rport->prlo == BFA_TRUE)
>>               bfa_fcs_rport_send_prlo_acc(rport);
>>           bfa_fcxp_discard(rport->fcxp);
>> -        /*
>> -         * !! fall through !!
>> -         */
>> +        /* fall through */
>>       case RPSM_EVENT_FAILED:
>>           if (rport->plogi_retries < BFA_FCS_RPORT_MAX_RETRIES) {
>>               rport->plogi_retries++;
>> @@ -868,9 +864,7 @@ bfa_fcs_rport_sm_adisc_online(struct bfa_fcs_rport_s *rport,
>>            * At least go offline when a PLOGI is received.
>>            */
>>           bfa_fcxp_discard(rport->fcxp);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case RPSM_EVENT_FAILED:
>>       case RPSM_EVENT_ADDRESS_CHANGE:
>> @@ -1056,6 +1050,7 @@ bfa_fcs_rport_sm_fc4_logosend(struct bfa_fcs_rport_s *rport,
>>       case RPSM_EVENT_LOGO_RCVD:
>>           bfa_fcs_rport_send_logo_acc(rport);
>> +        /* fall through */
>>       case RPSM_EVENT_PRLO_RCVD:
>>           if (rport->prlo == BFA_TRUE)
>>               bfa_fcs_rport_send_prlo_acc(rport);
>> @@ -1144,9 +1139,7 @@ bfa_fcs_rport_sm_hcb_offline(struct bfa_fcs_rport_s *rport,
>>               bfa_fcs_rport_send_plogiacc(rport, NULL);
>>               break;
>>           }
>> -        /*
>> -         * !! fall through !!
>> -         */
>> +        /* fall through */
>>       case RPSM_EVENT_ADDRESS_CHANGE:
>>           if (!bfa_fcs_lport_is_online(rport->port)) {
>> @@ -1303,6 +1296,7 @@ bfa_fcs_rport_sm_hcb_logosend(struct bfa_fcs_rport_s *rport,
>>       case RPSM_EVENT_LOGO_RCVD:
>>           bfa_fcs_rport_send_logo_acc(rport);
>> +        /* fall through */
>>       case RPSM_EVENT_PRLO_RCVD:
>>           if (rport->prlo == BFA_TRUE)
>>               bfa_fcs_rport_send_prlo_acc(rport);
>> @@ -1346,6 +1340,7 @@ bfa_fcs_rport_sm_logo_sending(struct bfa_fcs_rport_s *rport,
>>       case RPSM_EVENT_LOGO_RCVD:
>>           bfa_fcs_rport_send_logo_acc(rport);
>> +        /* fall through */
>>       case RPSM_EVENT_PRLO_RCVD:
>>           if (rport->prlo == BFA_TRUE)
>>               bfa_fcs_rport_send_prlo_acc(rport);
>>

2019-01-10 21:16:45

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that, in this particular case, I replaced "!!! fall through !!!"
>> with a "fall through" annotation, which is what GCC is expecting to
>> find.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
>>   1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
>> index b4f2c1d8742e..646f09f66443 100644
>> --- a/drivers/scsi/bfa/bfa_fcs_lport.c
>> +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
>> @@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
>>       switch (event) {
>>       case BFA_FCS_VPORT_SM_OFFLINE:
>>           bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_FCS_VPORT_SM_RSP_OK:
>>       case BFA_FCS_VPORT_SM_RSP_ERROR:
>> @@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
>>       switch (event) {
>>       case BFA_FCS_VPORT_SM_OFFLINE:
>>           bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_FCS_VPORT_SM_RSP_OK:
>>       case BFA_FCS_VPORT_SM_RSP_ERROR:
>>

2019-01-10 21:17:06

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 08/41] scsi: be2iscsi: be_main: Mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:38 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 1357387 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/be2iscsi/be_main.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
>> index effb6fc95af4..b6449da1320c 100644
>> --- a/drivers/scsi/be2iscsi/be_main.c
>> +++ b/drivers/scsi/be2iscsi/be_main.c
>> @@ -1539,6 +1539,7 @@ beiscsi_hdl_get_handle(struct beiscsi_conn *beiscsi_conn,
>>           break;
>>       case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
>>           error = 1;
>> +        /* fall through */
>>       case UNSOL_DATA_NOTIFY:
>>           pasync_handle = pasync_ctx->async_entry[ci].data;
>>           break;
>>

2019-01-10 21:18:52

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:36 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
>> annotation and then placed it at the bottom of the corresponding switch
>> case, which is what GCC is expecting to find.
>>
>> Addresses-Coverity-ID: 114961 ("Missing break in switch")
>> Addresses-Coverity-ID: 114962 ("Missing break in switch")
>> Addresses-Coverity-ID: 114963 ("Missing break in switch")
>> Addresses-Coverity-ID: 114964 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----
>>   1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
>> index 9ee75c9a9aa1..7e5044bf05c0 100644
>> --- a/drivers/scsi/aic7xxx/aic79xx_core.c
>> +++ b/drivers/scsi/aic7xxx/aic79xx_core.c
>> @@ -2285,6 +2285,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
>>               switch (scb->hscb->task_management) {
>>               case SIU_TASKMGMT_ABORT_TASK:
>>                   tag = SCB_GET_TAG(scb);
>> +                /* fall through */
>>               case SIU_TASKMGMT_ABORT_TASK_SET:
>>               case SIU_TASKMGMT_CLEAR_TASK_SET:
>>                   lun = scb->hscb->lun;
>> @@ -2295,6 +2296,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
>>                   break;
>>               case SIU_TASKMGMT_LUN_RESET:
>>                   lun = scb->hscb->lun;
>> +                /* fall through */
>>               case SIU_TASKMGMT_TARGET_RESET:
>>               {
>>                   struct ahd_devinfo devinfo;
>> @@ -6550,8 +6552,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
>>               kfree(sns_map);
>>           }
>>           ahd_dma_tag_destroy(ahd, scb_data->sense_dmat);
>> -        /* FALLTHROUGH */
>>       }
>> +        /* fall through */
>>       case 6:
>>       {
>>           struct map_node *sg_map;
>> @@ -6565,8 +6567,8 @@ ahd_fini_scbdata(struct ahd_softc *ahd)
>>               kfree(sg_map);
>>           }
>>           ahd_dma_tag_destroy(ahd, scb_data->sg_dmat);
>> -        /* FALLTHROUGH */
>>       }
>> +        /* fall through */
>>       case 5:
>>       {
>>           struct map_node *hscb_map;
>> @@ -7209,6 +7211,7 @@ ahd_init(struct ahd_softc *ahd)
>>           case FLX_CSTAT_OVER:
>>           case FLX_CSTAT_UNDER:
>>               warn_user++;
>> +            /* fall through */
>>           case FLX_CSTAT_INVALID:
>>           case FLX_CSTAT_OKAY:
>>               if (warn_user == 0 && bootverbose == 0)
>> @@ -8413,7 +8416,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
>>               if ((scb->flags & SCB_ACTIVE) == 0)
>>                   printk("Inactive SCB in Waiting List\n");
>>               ahd_done_with_status(ahd, scb, status);
>> -            /* FALLTHROUGH */
>> +            /* fall through */
>>           case SEARCH_REMOVE:
>>               ahd_rem_wscb(ahd, scbid, prev, next, tid);
>>               *list_tail = prev;
>> @@ -8422,6 +8425,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel,
>>               break;
>>           case SEARCH_PRINT:
>>               printk("0x%x ", scbid);
>> +            /* fall through */
>>           case SEARCH_COUNT:
>>               prev = scbid;
>>               break;
>> @@ -9547,8 +9551,8 @@ ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
>>       {
>>           fmt3_ins = &instr.format3;
>>           fmt3_ins->address = ahd_resolve_seqaddr(ahd, fmt3_ins->address);
>> -        /* FALLTHROUGH */
>>       }
>> +        /* fall through */
>>       case AIC_OP_OR:
>>       case AIC_OP_AND:
>>       case AIC_OP_XOR:
>> @@ -9559,7 +9563,7 @@ ahd_download_instr(struct ahd_softc *ahd, u_int instrptr, uint8_t *dconsts)
>>               fmt1_ins->immediate = dconsts[fmt1_ins->immediate];
>>           }
>>           fmt1_ins->parity = 0;
>> -        /* FALLTHROUGH */
>> +        /* fall through */
>>       case AIC_OP_ROL:
>>       {
>>           int i, count;
>>

2019-01-10 21:19:57

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 27/41] scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:32 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Drop thru" with
> "fall through" annotations, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index baed2b891efb..0eeed6c4c2ee 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -1427,7 +1427,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
>
> break;
> }
> - /* Drop thru */
> + /* fall through */
> case SCSI_PROT_WRITE_INSERT:
> /*
> * For WRITE_INSERT, force the error
> @@ -1546,7 +1546,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
> rc = BG_ERR_TGT | BG_ERR_CHECK;
> break;
> }
> - /* Drop thru */
> + /* fall through */
> case SCSI_PROT_WRITE_INSERT:
> /*
> * For WRITE_INSERT, force the
> @@ -1628,7 +1628,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
> switch (op) {
> case SCSI_PROT_WRITE_PASS:
> rc = BG_ERR_CHECK;
> - /* Drop thru */
> + /* fall through */
>
> case SCSI_PROT_WRITE_INSERT:
> /*
> @@ -4115,7 +4115,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
> lpfc_cmd->cur_iocbq.sli4_lxritag,
> 0, 0);
> }
> - /* else: fall through */
> + /* fall through */
> default:
> cmd->result = DID_ERROR << 16;
> break;
>

2019-01-10 21:23:05

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 12/41] scsi: bfa: bfa_ioc: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that, in this particular case, I replaced "!!! fall through !!!"
>> comment with "fall through" annotations, which is what GCC is expecting
>> to find.
>>
>> Addresses-Coverity-ID: 146155 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/bfa/bfa_ioc.c | 9 +++------
>>   1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
>> index 16d3aeb0e572..32b24e51cce6 100644
>> --- a/drivers/scsi/bfa/bfa_ioc.c
>> +++ b/drivers/scsi/bfa/bfa_ioc.c
>> @@ -978,9 +978,7 @@ bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
>>       case IOCPF_E_INITFAIL:
>>           bfa_iocpf_timer_stop(ioc);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case IOCPF_E_TIMEOUT:
>>           writel(1, ioc->ioc_regs.ioc_sem_reg);
>> @@ -1056,9 +1054,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
>>       case IOCPF_E_FAIL:
>>           bfa_iocpf_timer_stop(ioc);
>> -        /*
>> -         * !!! fall through !!!
>> -         */
>> +        /* fall through */
>>       case IOCPF_E_TIMEOUT:
>>           bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
>> @@ -6007,6 +6003,7 @@ bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf,
>>       case BFA_DCONF_SM_IOCDISABLE:
>>       case BFA_DCONF_SM_FLASH_COMP:
>>           bfa_timer_stop(&dconf->timer);
>> +        /* fall through */
>>       case BFA_DCONF_SM_TIMEOUT:
>>           bfa_sm_set_state(dconf, bfa_dconf_sm_uninit);
>>           bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE);
>>

2019-01-10 22:48:23

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 22/41] scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_ct.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
> index 6305ffeba7ea..b2b7fcc23654 100644
> --- a/drivers/scsi/lpfc/lpfc_ct.c
> +++ b/drivers/scsi/lpfc/lpfc_ct.c
> @@ -3050,6 +3050,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
> case SLI_MGMT_GHAT:
> case SLI_MGMT_GRPL:
> rsp_size = FC_MAX_NS_RSP;
> + /* fall through */
> case SLI_MGMT_DHBA:
> case SLI_MGMT_DHAT:
> pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID;
> @@ -3062,6 +3063,7 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
> case SLI_MGMT_GPAT:
> case SLI_MGMT_GPAS:
> rsp_size = FC_MAX_NS_RSP;
> + /* fall through */
> case SLI_MGMT_DPRT:
> case SLI_MGMT_DPA:
> pe = (struct lpfc_fdmi_port_entry *)&CtReq->un.PortID;
>

2019-01-10 22:48:58

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 23/41] scsi: lpfc: lpfc_els: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 114978 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_els.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index 5c34bfa624ef..1f20c35e0f84 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -8649,6 +8649,7 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
> lpfc_nlp_put(ndlp);
> return;
> }
> + /* fall through */
>
> default:
> /* Try to recover from this error */
>

2019-01-10 22:52:10

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 09/41] scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:38 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that I replaced "Fall through !!!" with a "fall through"
>> annotation, which is what GCC is expecting to find.
>>
>> Addresses-Coverity-ID: 114971 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/bfa/bfa_fcpim.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
>> index 2c85f5b1f9c1..7e996bcf026c 100644
>> --- a/drivers/scsi/bfa/bfa_fcpim.c
>> +++ b/drivers/scsi/bfa/bfa_fcpim.c
>> @@ -2586,6 +2586,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
>>       case FCP_IODIR_RW:
>>           bfa_stats(itnim, input_reqs);
>>           bfa_stats(itnim, output_reqs);
>> +        /* fall through */
>>       default:
>>           bfi_h2i_set(m->mh, BFI_MC_IOIM_IO, 0, bfa_fn_lpu(ioim->bfa));
>>       }
>> @@ -2820,6 +2821,7 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
>>       case BFI_IOIM_STS_TIMEDOUT:
>>           bfa_stats(ioim->itnim, iocomp_timedout);
>> +        /* fall through */
>>       case BFI_IOIM_STS_ABORTED:
>>           rsp->io_status = BFI_IOIM_STS_ABORTED;
>>           bfa_stats(ioim->itnim, iocomp_aborted);
>> @@ -3215,9 +3217,7 @@ bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
>>       switch (event) {
>>       case BFA_TSKIM_SM_DONE:
>>           bfa_reqq_wcancel(&tskim->reqq_wait);
>> -        /*
>> -         * Fall through !!!
>> -         */
>> +        /* fall through */
>>       case BFA_TSKIM_SM_QRESUME:
>>           bfa_sm_set_state(tskim, bfa_tskim_sm_cleanup);
>>           bfa_tskim_send_abort(tskim);
>>

2019-01-10 23:07:20

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 24/41] scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 11/27/18 10:31 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I replaced "Drop thru" with a
> "fall through" annotation, which is what GCC is expecting to find.
>
> Addresses-Coverity-ID: 114976 ("Missing break in switch")
> Addresses-Coverity-ID: 114977 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
> index 6c2fb55d739b..1a61806739ff 100644
> --- a/drivers/scsi/lpfc/lpfc_hbadisc.c
> +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
> @@ -4645,9 +4645,11 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba,
> case CMD_GEN_REQUEST64_CR:
> if (iocb->context_un.ndlp == ndlp)
> return 1;
> + /* fall through */
> case CMD_ELS_REQUEST64_CR:
> if (icmd->un.elsreq64.remoteID == ndlp->nlp_DID)
> return 1;
> + /* fall through */
> case CMD_XMIT_ELS_RSP64_CX:
> if (iocb->context1 == (uint8_t *) ndlp)
> return 1;
> @@ -5791,7 +5793,7 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport)
>
> case LPFC_LINK_UP:
> lpfc_issue_clear_la(phba, vport);
> - /* Drop thru */
> + /* fall through */
> case LPFC_LINK_UNKNOWN:
> case LPFC_WARM_START:
> case LPFC_INIT_START:
>

2019-01-10 23:07:50

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 16/41] scsi: imm: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Martin: apparently, the only maintainers for this
driver are you and James.

Thanks
--
Gustavo

On 11/27/18 10:29 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that, in this particular case, I placed all the "Phase N - ..."
> comments on the same line as its corresponding switch case. The same
> way in which similar comments appear in drivers/scsi/ppa.c. This makes
> it possible to place the "fall through" annotations at the bottom of
> each switch case, which is what GCC is expecting to find.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/scsi/imm.c | 33 +++++++++++++++++----------------
> 1 file changed, 17 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
> index 8c6627bc8a39..629e0bc70d3e 100644
> --- a/drivers/scsi/imm.c
> +++ b/drivers/scsi/imm.c
> @@ -796,21 +796,21 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> return 0;
> }
> return 1; /* wait until imm_wakeup claims parport */
> - /* Phase 1 - Connected */
> - case 1:
> +
> + case 1: /* Phase 1 - Connected */
> imm_connect(dev, CONNECT_EPP_MAYBE);
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 2 - We are now talking to the scsi bus */
> - case 2:
> + case 2: /* Phase 2 - We are now talking to the scsi bus */
> if (!imm_select(dev, scmd_id(cmd))) {
> imm_fail(dev, DID_NO_CONNECT);
> return 0;
> }
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 3 - Ready to accept a command */
> - case 3:
> + case 3: /* Phase 3 - Ready to accept a command */
> w_ctr(ppb, 0x0c);
> if (!(r_str(ppb) & 0x80))
> return 1;
> @@ -818,9 +818,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> if (!imm_send_command(cmd))
> return 0;
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 4 - Setup scatter/gather buffers */
> - case 4:
> + case 4: /* Phase 4 - Setup scatter/gather buffers */
> if (scsi_bufflen(cmd)) {
> cmd->SCp.buffer = scsi_sglist(cmd);
> cmd->SCp.this_residual = cmd->SCp.buffer->length;
> @@ -834,8 +834,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> cmd->SCp.phase++;
> if (cmd->SCp.this_residual & 0x01)
> cmd->SCp.this_residual++;
> - /* Phase 5 - Pre-Data transfer stage */
> - case 5:
> + /* fall through */
> +
> + case 5: /* Phase 5 - Pre-Data transfer stage */
> /* Spin lock for BUSY */
> w_ctr(ppb, 0x0c);
> if (!(r_str(ppb) & 0x80))
> @@ -850,9 +851,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> if (imm_negotiate(dev))
> return 0;
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 6 - Data transfer stage */
> - case 6:
> + case 6: /* Phase 6 - Data transfer stage */
> /* Spin lock for BUSY */
> w_ctr(ppb, 0x0c);
> if (!(r_str(ppb) & 0x80))
> @@ -866,9 +867,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> return 1;
> }
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 7 - Post data transfer stage */
> - case 7:
> + case 7: /* Phase 7 - Post data transfer stage */
> if ((dev->dp) && (dev->rd)) {
> if ((dev->mode == IMM_NIBBLE) || (dev->mode == IMM_PS2)) {
> w_ctr(ppb, 0x4);
> @@ -878,9 +879,9 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd)
> }
> }
> cmd->SCp.phase++;
> + /* fall through */
>
> - /* Phase 8 - Read status/message */
> - case 8:
> + case 8: /* Phase 8 - Read status/message */
> /* Check for data overrun */
> if (imm_wait(dev) != (unsigned char) 0xb8) {
> imm_fail(dev, DID_ERROR);
>

2019-01-10 23:08:17

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:37 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall through"
>> annotation and then placed it at the bottom of the corresponding switch
>> case, which is what GCC is expecting to find.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---
>>   1 file changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
>> index f3362f4ab16e..d4a7263e4b8f 100644
>> --- a/drivers/scsi/aic7xxx/aic7xxx_core.c
>> +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
>> @@ -4920,24 +4920,30 @@ ahc_fini_scbdata(struct ahc_softc *ahc)
>>           }
>>           ahc_dma_tag_destroy(ahc, scb_data->sg_dmat);
>>       }
>> +        /* fall through */
>>       case 6:
>>           ahc_dmamap_unload(ahc, scb_data->sense_dmat,
>>                     scb_data->sense_dmamap);
>> +        /* fall through */
>>       case 5:
>>           ahc_dmamem_free(ahc, scb_data->sense_dmat, scb_data->sense,
>>                   scb_data->sense_dmamap);
>>           ahc_dmamap_destroy(ahc, scb_data->sense_dmat,
>>                      scb_data->sense_dmamap);
>> +        /* fall through */
>>       case 4:
>>           ahc_dma_tag_destroy(ahc, scb_data->sense_dmat);
>> +        /* fall through */
>>       case 3:
>>           ahc_dmamap_unload(ahc, scb_data->hscb_dmat,
>>                     scb_data->hscb_dmamap);
>> +        /* fall through */
>>       case 2:
>>           ahc_dmamem_free(ahc, scb_data->hscb_dmat, scb_data->hscbs,
>>                   scb_data->hscb_dmamap);
>>           ahc_dmamap_destroy(ahc, scb_data->hscb_dmat,
>>                      scb_data->hscb_dmamap);
>> +        /* fall through */
>>       case 1:
>>           ahc_dma_tag_destroy(ahc, scb_data->hscb_dmat);
>>           break;
>> @@ -6002,8 +6008,8 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel,
>>                   if ((scb->flags & SCB_ACTIVE) == 0)
>>                       printk("Inactive SCB in Waiting List\n");
>>                   ahc_done(ahc, scb);
>> -                /* FALLTHROUGH */
>>               }
>> +                /* fall through */
>>               case SEARCH_REMOVE:
>>                   next = ahc_rem_wscb(ahc, next, prev);
>>                   break;
>> @@ -7008,8 +7014,8 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
>>           }
>>           address -= address_offset;
>>           fmt3_ins->address = address;
>> -        /* FALLTHROUGH */
>>       }
>> +        /* fall through */
>>       case AIC_OP_OR:
>>       case AIC_OP_AND:
>>       case AIC_OP_XOR:
>> @@ -7035,7 +7041,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts)
>>               fmt1_ins->opcode = AIC_OP_AND;
>>               fmt1_ins->immediate = 0xff;
>>           }
>> -        /* FALLTHROUGH */
>> +        /* fall through */
>>       case AIC_OP_ROL:
>>           if ((ahc->features & AHC_ULTRA2) != 0) {
>>               int i, count;
>>

2019-01-10 23:33:12

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH 07/41] scsi: be2iscsi: be_iscsi: Mark expected switch fall-through

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:37 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>>   drivers/scsi/be2iscsi/be_iscsi.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
>> index 96b96e2ab91a..ed1bd369baa0 100644
>> --- a/drivers/scsi/be2iscsi/be_iscsi.c
>> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
>> @@ -679,6 +679,7 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
>>       case ISCSI_PARAM_MAX_XMIT_DLENGTH:
>>           if (conn->max_xmit_dlength > 65536)
>>               conn->max_xmit_dlength = 65536;
>> +        /* fall through */
>>       default:
>>           return 0;
>>       }
>>

2019-01-11 00:23:05

by Grove, Bradley

[permalink] [raw]
Subject: Re: [PATCH 14/41] scsi: esas2r: esas2r_init: mark expected switch fall-throughs

Acked-by: Bradley Grove <[email protected]>


On 1/10/2019 3:08 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping (second one):
>
> Who can ack/review/take this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
>> Hi,
>>
>> Friendly ping:
>>
>> Who can ack or review this patch, please?
>>
>> Thanks
>> --
>> Gustavo
>>
>> On 11/27/18 10:28 PM, Gustavo A. R. Silva wrote:
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>>> where we are expecting to fall through.
>>>
>>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>>> ---
>>>   drivers/scsi/esas2r/esas2r_init.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/scsi/esas2r/esas2r_init.c
>>> b/drivers/scsi/esas2r/esas2r_init.c
>>> index 46b2c83ba21f..950cd92df2ff 100644
>>> --- a/drivers/scsi/esas2r/esas2r_init.c
>>> +++ b/drivers/scsi/esas2r/esas2r_init.c
>>> @@ -1241,6 +1241,7 @@ static bool esas2r_format_init_msg(struct
>>> esas2r_adapter *a,
>>>               a->init_msg = ESAS2R_INIT_MSG_GET_INIT;
>>>               break;
>>>           }
>>> +        /* fall through */
>>>       case ESAS2R_INIT_MSG_GET_INIT:
>>>           if (msg == ESAS2R_INIT_MSG_GET_INIT) {
>>> @@ -1254,7 +1255,7 @@ static bool esas2r_format_init_msg(struct
>>> esas2r_adapter *a,
>>>                   esas2r_hdebug("FAILED");
>>>               }
>>>           }
>>> -    /* fall through */
>>> +        /* fall through */
>>>       default:
>>>           rq->req_stat = RS_SUCCESS;
>>>



This electronic transmission and any attachments hereto are intended only for the use of the individual or entity to which it is addressed and may contain confidential information belonging to ATTO Technology, Inc. If you have reason to believe that you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this electronic transmission is strictly prohibited. If you have reason to believe that you have received this transmission in error, please notify ATTO immediately by return e-mail and delete and destroy this communication.

2019-01-11 07:51:17

by Sudarsana Reddy Kalluru

[permalink] [raw]
Subject: RE: [PATCH 12/41] scsi: bfa: bfa_ioc: Mark expected switch fall-throughs



-----Original Message-----
From: Gustavo A. R. Silva [mailto:[email protected]]
Sent: 11 January 2019 01:41
To: Anil Gurumurthy <[email protected]>; Sudarsana Kalluru <[email protected]>
Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH 12/41] scsi: bfa: bfa_ioc: Mark expected switch fall-throughs

External Email

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that, in this particular case, I replaced "!!! fall through !!!"
>> comment with "fall through" annotations, which is what GCC is
>> expecting to find.
>>
>> Addresses-Coverity-ID: 146155 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>> drivers/scsi/bfa/bfa_ioc.c | 9 +++------
>> 1 file changed, 3 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
>> index 16d3aeb0e572..32b24e51cce6 100644
>> --- a/drivers/scsi/bfa/bfa_ioc.c
>> +++ b/drivers/scsi/bfa/bfa_ioc.c
>> @@ -978,9 +978,7 @@ bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
>> case IOCPF_E_INITFAIL:
>> bfa_iocpf_timer_stop(ioc);
>> - /*
>> - * !!! fall through !!!
>> - */
>> + /* fall through */
>> case IOCPF_E_TIMEOUT:
>> writel(1, ioc->ioc_regs.ioc_sem_reg); @@ -1056,9 +1054,7 @@
>> bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)
>> case IOCPF_E_FAIL:
>> bfa_iocpf_timer_stop(ioc);
>> - /*
>> - * !!! fall through !!!
>> - */
>> + /* fall through */
>> case IOCPF_E_TIMEOUT:
>> bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL); @@ -6007,6
>> +6003,7 @@ bfa_dconf_sm_final_sync(struct bfa_dconf_mod_s *dconf,
>> case BFA_DCONF_SM_IOCDISABLE:
>> case BFA_DCONF_SM_FLASH_COMP:
>> bfa_timer_stop(&dconf->timer);
>> + /* fall through */
>> case BFA_DCONF_SM_TIMEOUT:
>> bfa_sm_set_state(dconf, bfa_dconf_sm_uninit);
>> bfa_fsm_send_event(&dconf->bfa->iocfc, IOCFC_E_DCONF_DONE);
>>

Acked-by: Sudarsana Kalluru <[email protected]>

2019-01-11 07:51:38

by Sudarsana Reddy Kalluru

[permalink] [raw]
Subject: RE: [PATCH 11/41] scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs


-----Original Message-----
From: Gustavo A. R. Silva [mailto:[email protected]]
Sent: 11 January 2019 01:42
To: Anil Gurumurthy <[email protected]>; Sudarsana Kalluru <[email protected]>
Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH 11/41] scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs

External Email

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that I replaced "!! fall through !!" and "!!! fall through !!!"
>> comments with "fall through" annotations, which is what GCC is
>> expecting to find.
>>
>> Addresses-Coverity-ID: 744899 ("Missing break in switch")
>> Addresses-Coverity-ID: 744900 ("Missing break in switch")
>> Addresses-Coverity-ID: 744901 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>> drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
>> 1 file changed, 7 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c
>> b/drivers/scsi/bfa/bfa_fcs_rport.c
>> index de50349a39ce..1e400f2aaece 100644
>> --- a/drivers/scsi/bfa/bfa_fcs_rport.c
>> +++ b/drivers/scsi/bfa/bfa_fcs_rport.c
>> @@ -427,17 +427,13 @@ bfa_fcs_rport_sm_plogi(struct bfa_fcs_rport_s *rport, enum rport_event event)
>> case RPSM_EVENT_LOGO_RCVD:
>> bfa_fcs_rport_send_logo_acc(rport);
>> - /*
>> - * !! fall through !!
>> - */
>> + /* fall through */
>> case RPSM_EVENT_PRLO_RCVD:
>> if (rport->prlo == BFA_TRUE)
>> bfa_fcs_rport_send_prlo_acc(rport);
>> bfa_fcxp_discard(rport->fcxp);
>> - /*
>> - * !! fall through !!
>> - */
>> + /* fall through */
>> case RPSM_EVENT_FAILED:
>> if (rport->plogi_retries < BFA_FCS_RPORT_MAX_RETRIES) {
>> rport->plogi_retries++; @@ -868,9 +864,7 @@
>> bfa_fcs_rport_sm_adisc_online(struct bfa_fcs_rport_s *rport,
>> * At least go offline when a PLOGI is received.
>> */
>> bfa_fcxp_discard(rport->fcxp);
>> - /*
>> - * !!! fall through !!!
>> - */
>> + /* fall through */
>> case RPSM_EVENT_FAILED:
>> case RPSM_EVENT_ADDRESS_CHANGE:
>> @@ -1056,6 +1050,7 @@ bfa_fcs_rport_sm_fc4_logosend(struct bfa_fcs_rport_s *rport,
>> case RPSM_EVENT_LOGO_RCVD:
>> bfa_fcs_rport_send_logo_acc(rport);
>> + /* fall through */
>> case RPSM_EVENT_PRLO_RCVD:
>> if (rport->prlo == BFA_TRUE)
>> bfa_fcs_rport_send_prlo_acc(rport);
>> @@ -1144,9 +1139,7 @@ bfa_fcs_rport_sm_hcb_offline(struct bfa_fcs_rport_s *rport,
>> bfa_fcs_rport_send_plogiacc(rport, NULL);
>> break;
>> }
>> - /*
>> - * !! fall through !!
>> - */
>> + /* fall through */
>> case RPSM_EVENT_ADDRESS_CHANGE:
>> if (!bfa_fcs_lport_is_online(rport->port)) { @@ -1303,6
>> +1296,7 @@ bfa_fcs_rport_sm_hcb_logosend(struct bfa_fcs_rport_s *rport,
>> case RPSM_EVENT_LOGO_RCVD:
>> bfa_fcs_rport_send_logo_acc(rport);
>> + /* fall through */
>> case RPSM_EVENT_PRLO_RCVD:
>> if (rport->prlo == BFA_TRUE)
>> bfa_fcs_rport_send_prlo_acc(rport);
>> @@ -1346,6 +1340,7 @@ bfa_fcs_rport_sm_logo_sending(struct bfa_fcs_rport_s *rport,
>> case RPSM_EVENT_LOGO_RCVD:
>> bfa_fcs_rport_send_logo_acc(rport);
>> + /* fall through */
>> case RPSM_EVENT_PRLO_RCVD:
>> if (rport->prlo == BFA_TRUE)
>> bfa_fcs_rport_send_prlo_acc(rport);
>>

Acked-by: Sudarsana Kalluru <[email protected]>

2019-01-11 09:01:22

by Hannes Reinecke

[permalink] [raw]
Subject: Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

On 1/10/19 9:15 PM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping (second one):
>
> Who can ack/review/take this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 12/19/18 9:36 AM, Gustavo A. R. Silva wrote:
>> Hi,
>>
>> Friendly ping:
>>
>> Who can ack or review this patch, please?
>>
>> Thanks
>> --
>> Gustavo
>>
>> On 11/27/18 10:26 PM, Gustavo A. R. Silva wrote:
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>>> where we are expecting to fall through.
>>>
>>> Notice that, in some cases, I replaced "FALLTHROUGH" with a "fall
>>> through"
>>> annotation and then placed it at the bottom of the corresponding switch
>>> case, which is what GCC is expecting to find.
>>>
>>> Addresses-Coverity-ID: 114961 ("Missing break in switch")
>>> Addresses-Coverity-ID: 114962 ("Missing break in switch")
>>> Addresses-Coverity-ID: 114963 ("Missing break in switch")
>>> Addresses-Coverity-ID: 114964 ("Missing break in switch")
>>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>>> ---
>>>   drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----
>>>   1 file changed, 9 insertions(+), 5 deletions(-)
>>>
Sorry, I thought I'd done so already.

Reviewed-by: Hannes Reinecke <[email protected]>

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
[email protected] +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

2019-01-11 10:21:25

by Sudarsana Reddy Kalluru

[permalink] [raw]
Subject: RE: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs


-----Original Message-----
From: Gustavo A. R. Silva [mailto:[email protected]]
Sent: 11 January 2019 01:42
To: Anil Gurumurthy <[email protected]>; Sudarsana Kalluru <[email protected]>
Cc: James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

External Email

Hi,

Friendly ping (second one):

Who can ack/review/take this patch, please?

Thanks
--
Gustavo

On 12/19/18 9:39 AM, Gustavo A. R. Silva wrote:
> Hi,
>
> Friendly ping:
>
> Who can ack or review this patch, please?
>
> Thanks
> --
> Gustavo
>
> On 11/27/18 10:27 PM, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that, in this particular case, I replaced "!!! fall through !!!"
>> with a "fall through" annotation, which is what GCC is expecting to
>> find.
>>
>> Signed-off-by: Gustavo A. R. Silva <[email protected]>
>> ---
>> drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c
>> b/drivers/scsi/bfa/bfa_fcs_lport.c
>> index b4f2c1d8742e..646f09f66443 100644
>> --- a/drivers/scsi/bfa/bfa_fcs_lport.c
>> +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
>> @@ -6430,9 +6430,7 @@ bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
>> switch (event) {
>> case BFA_FCS_VPORT_SM_OFFLINE:
>> bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> - /*
>> - * !!! fall through !!!
>> - */
>> + /* fall through */
>> case BFA_FCS_VPORT_SM_RSP_OK:
>> case BFA_FCS_VPORT_SM_RSP_ERROR:
>> @@ -6458,9 +6456,7 @@ bfa_fcs_vport_sm_logo(struct bfa_fcs_vport_s *vport,
>> switch (event) {
>> case BFA_FCS_VPORT_SM_OFFLINE:
>> bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE);
>> - /*
>> - * !!! fall through !!!
>> - */
>> + /* fall through */
>> case BFA_FCS_VPORT_SM_RSP_OK:
>> case BFA_FCS_VPORT_SM_RSP_ERROR:
>>

Acked-by: Sudarsana Kalluru <[email protected]>

2019-01-12 02:07:45

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 36/41] scsi: qla4xxx: ql4_os: mark expected switch fall-through


Nilesh,

>>In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>>where we are expecting to fall through.
>>
>>Notice that, in this particular case, I replaced "allow fall-through"
>>with a "fall through" annotation, which is what GCC is expecting to
>>find.

Applied to 5.1/scsi-queue. Thanks, Gustavo.

--
Martin K. Petersen Oracle Linux Engineering

2019-01-12 02:47:14

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 14/41] scsi: esas2r: esas2r_init: mark expected switch fall-throughs


Gustavo,

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

Applied to 5.1/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2019-01-12 02:50:15

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 10/41] scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs


Gustavo,

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

Applied this and two other bfa patches to 5.1/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering

2019-01-12 02:54:17

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through


Hannes,

>> Friendly ping (second one):
>>
>> Who can ack/review/take this patch, please?

Applied to 5.1/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering