Skip to contentSkip to conversation

scsi: Mark expected switch fall-throughs

PATCH Applied Gustavo A. R. Silva 18 participants 143 messages Nov 28, 2018 – Jan 12, 2019 5 messages not in the archive

Subsystems (20)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

PATCH 1/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")

---
 drivers/scsi/BusLogic.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/BusLogic.c +1 -0
index 9cee941f97d6..717eef3ee893 100644
@@ -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:
Signature · 1 line
2.17.1
maintainer Acked-by on v1 1/41
#2 lore raw

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

Quoted 15 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056537 ("Missing break in switch")

---
 drivers/scsi/BusLogic.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/BusLogic.c +0 -0
index 9cee941f97d6..717eef3ee893 100644

drivers/scsi/BusLogic.c static int blogic_resultcode(struct blogic_adapter *adapter, · line 2647

Quoted 7 lines
drivers/scsi/BusLogic.c +1 -0
@@ -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.

#3 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue, thanks.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#4 lore raw

PATCH 2/41 scsi: NCR5380: Mark expected switch fall-through

In reply to 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.

---
 drivers/scsi/NCR5380.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/NCR5380.c +1 -2
index 01c23d27f290..12073e52a0eb 100644
@@ -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,
Signature · 1 line
2.17.1
maintainer
#5 lore raw

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

Gustavo,

Am 28.11.18 um 17:24 schrieb Gustavo A. R. Silva:

Quoted 20 lines

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.

---
 drivers/scsi/NCR5380.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/NCR5380.c +0 -0
index 01c23d27f290..12073e52a0eb 100644
@@ -1933,12 +1933,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
 					if (!hostdata->connected)
 						return;
 

drivers/scsi/NCR5380.c static void NCR5380_information_transfer(struct Scsi_Host *instance) · line 1943

Quoted 10 lines
drivers/scsi/NCR5380.c +1 -2
-					/* 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

#6 lore raw

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

Hi Michael,

Quoted 9 lines · Michael Schmitz

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

#7 lore raw

PATCH 3/41 scsi: aacraid: aachba: Mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Also, a break statement is properly aligned.

---
 drivers/scsi/aacraid/aachba.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/scsi/aacraid/aachba.c +4 -1
index bd7f352c28f3..75ab5ff6b78c 100644
@@ -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:
Signature · 1 line
2.17.1
Reviewed-by Dave Carroll on v1 3/41
#8 lore raw

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

Quoted 12 lines

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

Quoted 7 lines

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

Also, a break statement is properly aligned.

---

#9 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#10 lore raw

PATCH 4/41 scsi: aacraid: linit: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/aacraid/linit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/aacraid/linit.c +1 -0
index 2d4e4ddc5ace..42defee90eb2 100644
@@ -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:
 			/*
Signature · 1 line
2.17.1
Reviewed-by Dave Carroll on v1 4/41
#11 lore raw

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

Quoted 10 lines

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

Quoted 6 lines

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

---
 drivers/scsi/aacraid/linit.c | 1 +
#12 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#13 lore raw

PATCH 5/41 scsi: aic7xxx: aic79xx: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c +9 -5
index 9ee75c9a9aa1..7e5044bf05c0 100644
@@ -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;
Signature · 1 line
2.17.1
#14 lore raw

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

Quoted 101 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----
  1 file changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c +9 -5
index 9ee75c9a9aa1..7e5044bf05c0 100644
@@ -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;
#15 lore raw

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

Quoted 112 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 101 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----

  1 file changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c +0 -0
index 9ee75c9a9aa1..7e5044bf05c0 100644
@@ -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;

drivers/scsi/aic7xxx/aic79xx_core.c +0 -0
@@ -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;

drivers/scsi/aic7xxx/aic79xx_core.c +1 -1
@@ -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;

drivers/scsi/aic7xxx/aic79xx_core.c +1 -1
@@ -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;

drivers/scsi/aic7xxx/aic79xx_core.c +0 -0
@@ -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)

drivers/scsi/aic7xxx/aic79xx_core.c +1 -1
@@ -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;

drivers/scsi/aic7xxx/aic79xx_core.c +0 -0
@@ -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;

drivers/scsi/aic7xxx/aic79xx_core.c +1 -1
@@ -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:

drivers/scsi/aic7xxx/aic79xx_core.c +1 -1
@@ -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;

maintainer Reviewed-by
#16 lore raw

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

Quoted 38 lines · Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks

Signature · 1 line
Gustavo
Quoted 27 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 16 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/aic7xxx/aic79xx_core.c | 14 +++++++++-----

  1 file changed, 9 insertions(+), 5 deletions(-)

Sorry, I thought I'd done so already.

Cheers,

Hannes

Signature · 5 lines
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)
#17 lore raw

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

Hannes,

Quoted 3 lines
Quoted 3 lines

Friendly ping (second one):

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

Applied to 5.1/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#18 lore raw

PATCH 6/41 scsi: aic7xxx: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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.

---
 drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/scsi/aic7xxx/aic7xxx_core.c +9 -3
index f3362f4ab16e..d4a7263e4b8f 100644
@@ -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;
Signature · 1 line
2.17.1
#19 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 77 lines · Gustavo A. R. Silva

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.

---
  drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
drivers/scsi/aic7xxx/aic7xxx_core.c +9 -3
index f3362f4ab16e..d4a7263e4b8f 100644
@@ -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;
#20 lore raw

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

Quoted 88 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 77 lines · Gustavo A. R. Silva

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.

---
  drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +++++++++---

  1 file changed, 9 insertions(+), 3 deletions(-)
drivers/scsi/aic7xxx/aic7xxx_core.c +1 -0
index f3362f4ab16e..d4a7263e4b8f 100644
@@ -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;

drivers/scsi/aic7xxx/aic7xxx_core.c +1 -1
@@ -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;

drivers/scsi/aic7xxx/aic7xxx_core.c +1 -1
@@ -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:

drivers/scsi/aic7xxx/aic7xxx_core.c +1 -1
@@ -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;

#21 lore raw

PATCH 7/41 scsi: be2iscsi: be_iscsi: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/be2iscsi/be_iscsi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_iscsi.c +1 -0
index 96b96e2ab91a..ed1bd369baa0 100644
@@ -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;
 	}
Signature · 1 line
2.17.1
#22 lore raw

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

Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/be2iscsi/be_iscsi.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_iscsi.c +1 -0
index 96b96e2ab91a..ed1bd369baa0 100644
@@ -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;
  	}
#23 lore raw

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

Quoted 32 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/be2iscsi/be_iscsi.c | 1 +

  1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
index 96b96e2ab91a..ed1bd369baa0 100644
@@ -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;
      }

#24 lore raw

PATCH 8/41 scsi: be2iscsi: be_main: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1357387 ("Missing break in switch")

---
 drivers/scsi/be2iscsi/be_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_main.c +1 -0
index effb6fc95af4..b6449da1320c 100644
@@ -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;
Signature · 1 line
2.17.1
#25 lore raw

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

Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1357387 ("Missing break in switch")

---
  drivers/scsi/be2iscsi/be_main.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_main.c +1 -0
index effb6fc95af4..b6449da1320c 100644
@@ -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;
#26 lore raw

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

Quoted 33 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1357387 ("Missing break in switch")

---
  drivers/scsi/be2iscsi/be_main.c | 1 +

  1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_main.c +0 -0
index effb6fc95af4..b6449da1320c 100644
@@ -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;

#27 lore raw

PATCH 9/41 scsi: bfa: bfa_fcpim: Mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/bfa/bfa_fcpim.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/bfa/bfa_fcpim.c +3 -3
index 2c85f5b1f9c1..7e996bcf026c 100644
@@ -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);
Signature · 1 line
2.17.1
#28 lore raw

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

Quoted 44 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/bfa/bfa_fcpim.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/bfa/bfa_fcpim.c +3 -3
index 2c85f5b1f9c1..7e996bcf026c 100644
@@ -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);
#29 lore raw

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

Quoted 54 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 43 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/bfa/bfa_fcpim.c | 6 +++---

  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/bfa/bfa_fcpim.c +0 -0
index 2c85f5b1f9c1..7e996bcf026c 100644
@@ -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)); }

drivers/scsi/bfa/bfa_fcpim.c +0 -0
@@ -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);

drivers/scsi/bfa/bfa_fcpim.c +0 -0
@@ -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);

#30 lore raw

PATCH 10/41 scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughs

In reply to 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 !!!" with a "fall through" annotation, which is what GCC is expecting to find.

---
 drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_fcs_lport.c +2 -6
index b4f2c1d8742e..646f09f66443 100644
@@ -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:
Signature · 1 line
2.17.1
#31 lore raw

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

Quoted 39 lines · 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 !!!" with a "fall through" annotation, which is what GCC is expecting to find.

---
  drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_fcs_lport.c +2 -6
index b4f2c1d8742e..646f09f66443 100644
@@ -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:
#32 lore raw

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

Quoted 48 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 37 lines · 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 !!!" with a "fall through" annotation, which is what GCC is expecting to find.

---
  drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------

  1 file changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_fcs_lport.c +0 -0
index b4f2c1d8742e..646f09f66443 100644
@@ -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:

drivers/scsi/bfa/bfa_fcs_lport.c +0 -0
@@ -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
#33 lore raw

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

Quoted 41 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 30 lines · 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 !!!" with a "fall through" annotation, which is what GCC is expecting to find.

---
  drivers/scsi/bfa/bfa_fcs_lport.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_fcs_lport.c +1 -3
index b4f2c1d8742e..646f09f66443 100644
@@ -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:
Quoted 8 lines

drivers/scsi/bfa/bfa_fcs_lport.c bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,

Quoted 8 lines
drivers/scsi/bfa/bfa_fcs_lport.c +1 -3
          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:
 
#34 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo,

Quoted 2 lines

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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#35 lore raw

PATCH 11/41 scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
drivers/scsi/bfa/bfa_fcs_rport.c +7 -12
index de50349a39ce..1e400f2aaece 100644
@@ -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);
Signature · 1 line
2.17.1
#36 lore raw

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

Quoted 86 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
  1 file changed, 7 insertions(+), 12 deletions(-)
drivers/scsi/bfa/bfa_fcs_rport.c +7 -12
index de50349a39ce..1e400f2aaece 100644
@@ -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);
#37 lore raw

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

Quoted 90 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 79 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------

  1 file changed, 7 insertions(+), 12 deletions(-)
drivers/scsi/bfa/bfa_fcs_rport.c +0 -0
index de50349a39ce..1e400f2aaece 100644
@@ -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++;

drivers/scsi/bfa/bfa_fcs_rport.c +1 -3
@@ -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:

drivers/scsi/bfa/bfa_fcs_rport.c +0 -0
@@ -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);

drivers/scsi/bfa/bfa_fcs_rport.c +1 -3
@@ -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)) {

drivers/scsi/bfa/bfa_fcs_rport.c +0 -0
@@ -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);

drivers/scsi/bfa/bfa_fcs_rport.c +0 -0
@@ -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
#38 lore raw

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

Quoted 83 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 72 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/bfa/bfa_fcs_rport.c | 19 +++++++------------
  1 file changed, 7 insertions(+), 12 deletions(-)
drivers/scsi/bfa/bfa_fcs_rport.c +2 -6
index de50349a39ce..1e400f2aaece 100644
@@ -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);
drivers/scsi/bfa/bfa_fcs_rport.c +5 -6
-        /*
-         * !!! 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);
Quoted 8 lines

drivers/scsi/bfa/bfa_fcs_rport.c bfa_fcs_rport_sm_logo_sending(struct bfa_fcs_rport_s *rport, · line 1346

Quoted 8 lines
drivers/scsi/bfa/bfa_fcs_rport.c +1 -0
@@ -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);
 
#39 lore raw

PATCH 12/41 scsi: bfa: bfa_ioc: Mark expected switch fall-throughs

In reply to 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 !!!" comment with "fall through" annotations, which is what GCC is expecting to find.

Addresses-Coverity-ID: 146155 ("Missing break in switch")

---
 drivers/scsi/bfa/bfa_ioc.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_ioc.c +3 -6
index 16d3aeb0e572..32b24e51cce6 100644
@@ -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);
Signature · 1 line
2.17.1
#40 lore raw

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

Quoted 48 lines · 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 !!!" comment with "fall through" annotations, which is what GCC is expecting to find.

Addresses-Coverity-ID: 146155 ("Missing break in switch")

---
  drivers/scsi/bfa/bfa_ioc.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_ioc.c +3 -6
index 16d3aeb0e572..32b24e51cce6 100644
@@ -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);
#41 lore raw

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

Quoted 55 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 44 lines · 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 !!!" comment with "fall through" annotations, which is what GCC is expecting to find.

Addresses-Coverity-ID: 146155 ("Missing break in switch")

---
  drivers/scsi/bfa/bfa_ioc.c | 9 +++------

  1 file changed, 3 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_ioc.c +0 -0
index 16d3aeb0e572..32b24e51cce6 100644
@@ -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);

drivers/scsi/bfa/bfa_ioc.c +0 -0
@@ -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);

drivers/scsi/bfa/bfa_ioc.c +0 -0
@@ -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
#42 lore raw

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

Quoted 47 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 36 lines · 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 !!!" comment with "fall through" annotations, which is what GCC is expecting to find.

Addresses-Coverity-ID: 146155 ("Missing break in switch")

---
  drivers/scsi/bfa/bfa_ioc.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
drivers/scsi/bfa/bfa_ioc.c +1 -3
index 16d3aeb0e572..32b24e51cce6 100644
@@ -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);
drivers/scsi/bfa/bfa_ioc.c +2 -3
-        /*
-         * !!! 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,
Quoted 8 lines
Quoted 8 lines
      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);
#43 lore raw

PATCH 13/41 scsi: csiostor: csio_wr: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056538 ("Missing break in switch")

---
 drivers/scsi/csiostor/csio_wr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/csiostor/csio_wr.c +1 -0
index dc12933533d5..b6861ea66c9f 100644
@@ -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);
Signature · 1 line
2.17.1
#44 lore raw

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

Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056538 ("Missing break in switch")

---
  drivers/scsi/csiostor/csio_wr.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/csiostor/csio_wr.c +1 -0
index dc12933533d5..b6861ea66c9f 100644
@@ -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);
#45 lore raw

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

Quoted 32 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 21 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1056538 ("Missing break in switch")

---
  drivers/scsi/csiostor/csio_wr.c | 1 +

  1 file changed, 1 insertion(+)
drivers/scsi/csiostor/csio_wr.c +1 -0
index dc12933533d5..b6861ea66c9f 100644
@@ -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);

#46 lore raw

PATCH 14/41 scsi: esas2r: esas2r_init: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/esas2r/esas2r_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_init.c +2 -1
index 46b2c83ba21f..950cd92df2ff 100644
@@ -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;
Signature · 1 line
2.17.1
#47 lore raw

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

Quoted 30 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/esas2r/esas2r_init.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_init.c +2 -1
index 46b2c83ba21f..950cd92df2ff 100644
@@ -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;
#48 lore raw

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

Quoted 39 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 28 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/esas2r/esas2r_init.c | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_init.c +1 -0
index 46b2c83ba21f..950cd92df2ff 100644
@@ -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) {

drivers/scsi/esas2r/esas2r_init.c +1 -1
@@ -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;

Acked-by Bradley Grove
#49 lore raw

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

Quoted 52 lines · Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks

Signature · 1 line
Gustavo
Quoted 41 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 27 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/esas2r/esas2r_init.c | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_init.c +1 -0
index 46b2c83ba21f..950cd92df2ff 100644
@@ -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) {

drivers/scsi/esas2r/esas2r_init.c +1 -1
@@ -1254,7 +1255,7 @@ static bool esas2r_format_init_msg(struct 
 esas2r_adapter *a,
                   esas2r_hdebug("FAILED");
               }
           }
-    /* fall through */
+        /* fall through */
Quoted 3 lines

      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.

#50 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo,

Quoted 2 lines

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

Applied to 5.1/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#51 lore raw

PATCH 15/41 scsi: hpsa: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/hpsa.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/scsi/hpsa.c +5 -0
index c9cccf35e9d7..bc64e8a0449d 100644
@@ -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) |
Signature · 1 line
2.17.1
maintainer Acked-by Don Brace on v1 15/41
#52 lore raw

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

#53 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#54 lore raw

PATCH 16/41 scsi: imm: mark expected switch fall-throughs

In reply to 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 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.

---
 drivers/scsi/imm.c | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)
drivers/scsi/imm.c +17 -16
index 8c6627bc8a39..629e0bc70d3e 100644
@@ -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);
Signature · 1 line
2.17.1
#55 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 107 lines · 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 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.

---
  drivers/scsi/imm.c | 33 +++++++++++++++++----------------
  1 file changed, 17 insertions(+), 16 deletions(-)
drivers/scsi/imm.c +17 -16
index 8c6627bc8a39..629e0bc70d3e 100644
@@ -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);
#56 lore raw

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

In reply to Gustavo A. R. Silva

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

Quoted 107 lines · 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 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.

---
  drivers/scsi/imm.c | 33 +++++++++++++++++----------------
  1 file changed, 17 insertions(+), 16 deletions(-)
drivers/scsi/imm.c +17 -16
index 8c6627bc8a39..629e0bc70d3e 100644
@@ -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);
#57 lore raw

PATCH 17/41 scsi: isci: phy: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 703127 ("Missing break in switch")

---
 drivers/scsi/isci/phy.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/isci/phy.c +1 -0
index 1deca8c5a94f..7f9b3f20e5e4 100644
@@ -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);
Signature · 1 line
2.17.1
#58 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 703127 ("Missing break in switch")

---
  drivers/scsi/isci/phy.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/isci/phy.c +1 -0
index 1deca8c5a94f..7f9b3f20e5e4 100644
@@ -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);
#59 lore raw

PATCH 18/41 scsi: isci: remote_device: Mark expected switch fall-throughs

In reply to 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, 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.

---
 drivers/scsi/isci/remote_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/isci/remote_device.c +2 -2
index cc51f38b116d..9d29edb9f590 100644
@@ -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",
Signature · 1 line
2.17.1
#60 lore raw

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

Signature · 1 line
Gustavo
Quoted 35 lines · 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, 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.

---
  drivers/scsi/isci/remote_device.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/isci/remote_device.c +2 -2
index cc51f38b116d..9d29edb9f590 100644
@@ -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",
#61 lore raw

PATCH 19/41 scsi: isci: remote_node_context: mark expected switch fall-throughs

In reply to 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, 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.

---
 drivers/scsi/isci/remote_node_context.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/isci/remote_node_context.c +2 -2
index e3f2a5359d71..474a43460963 100644
@@ -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
Signature · 1 line
2.17.1
#62 lore raw

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

Signature · 1 line
Gustavo
Quoted 29 lines · 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, 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.

---
  drivers/scsi/isci/remote_node_context.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/isci/remote_node_context.c +2 -2
index e3f2a5359d71..474a43460963 100644
@@ -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
#63 lore raw

PATCH 20/41 scsi: isci: request: mark expected switch fall-through

In reply to 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, 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.

---
 drivers/scsi/isci/request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/isci/request.c +1 -1
index 2f151708b59a..1b18cf55167e 100644
@@ -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);
Signature · 1 line
2.17.1
#64 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 26 lines · 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, 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.

---
  drivers/scsi/isci/request.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/isci/request.c +1 -1
index 2f151708b59a..1b18cf55167e 100644
@@ -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);
#65 lore raw

PATCH 21/41 scsi: libfc: fc_rport: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/libfc/fc_rport.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/libfc/fc_rport.c +1 -0
index 638f42a5200e..9192a1d9dec6 100644
@@ -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",
Signature · 1 line
2.17.1
#67 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#68 lore raw

PATCH 22/41 scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/lpfc/lpfc_ct.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/lpfc/lpfc_ct.c +2 -0
index 6305ffeba7ea..b2b7fcc23654 100644
@@ -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;
Signature · 1 line
2.17.1
#69 lore raw

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

Signature · 1 line
Gustavo
Quoted 29 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/lpfc/lpfc_ct.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/scsi/lpfc/lpfc_ct.c +2 -0
index 6305ffeba7ea..b2b7fcc23654 100644
@@ -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;
#70 lore raw

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

In reply to Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks
--
Gustavo

Quoted 29 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/lpfc/lpfc_ct.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/scsi/lpfc/lpfc_ct.c +2 -0
index 6305ffeba7ea..b2b7fcc23654 100644
@@ -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;
#71 lore raw

PATCH 23/41 scsi: lpfc: lpfc_els: Mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114978 ("Missing break in switch")

---
 drivers/scsi/lpfc/lpfc_els.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_els.c +1 -0
index 5c34bfa624ef..1f20c35e0f84 100644
@@ -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 */
Signature · 1 line
2.17.1
#72 lore raw

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

Signature · 1 line
Gustavo
Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114978 ("Missing break in switch")

---
  drivers/scsi/lpfc/lpfc_els.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_els.c +1 -0
index 5c34bfa624ef..1f20c35e0f84 100644
@@ -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 */
#73 lore raw

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

In reply to Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks
--
Gustavo

Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114978 ("Missing break in switch")

---
  drivers/scsi/lpfc/lpfc_els.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_els.c +1 -0
index 5c34bfa624ef..1f20c35e0f84 100644
@@ -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 */
#74 lore raw

PATCH 24/41 scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs

In reply to 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 "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")

---
 drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +3 -1
index 6c2fb55d739b..1a61806739ff 100644
@@ -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:
Signature · 1 line
2.17.1
#75 lore raw

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

Signature · 1 line
Gustavo
Quoted 39 lines · 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 "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")

---
  drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +3 -1
index 6c2fb55d739b..1a61806739ff 100644
@@ -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:
#76 lore raw

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

In reply to Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks
--
Gustavo

Quoted 39 lines · 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 "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")

---
  drivers/scsi/lpfc/lpfc_hbadisc.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_hbadisc.c +3 -1
index 6c2fb55d739b..1a61806739ff 100644
@@ -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:
#77 lore raw

PATCH 25/41 scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/lpfc/lpfc_nportdisc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_nportdisc.c +1 -0
index 7d5693cfaa87..e8583496feaf 100644
@@ -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:
Signature · 1 line
2.17.1
#78 lore raw

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

Signature · 1 line
Gustavo
Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/lpfc/lpfc_nportdisc.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_nportdisc.c +1 -0
index 7d5693cfaa87..e8583496feaf 100644
@@ -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:
#79 lore raw

PATCH 26/41 scsi: lpfc: lpfc_nvme: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/lpfc/lpfc_nvme.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_nvme.c +1 -0
index ba831def9301..942fe58c433d 100644
@@ -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,
Signature · 1 line
2.17.1
#80 lore raw

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

Signature · 1 line
Gustavo
Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/lpfc/lpfc_nvme.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_nvme.c +1 -0
index ba831def9301..942fe58c433d 100644
@@ -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,
#81 lore raw

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

In reply to Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks
--
Gustavo

Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/lpfc/lpfc_nvme.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_nvme.c +1 -0
index ba831def9301..942fe58c433d 100644
@@ -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,
#82 lore raw

PATCH 27/41 scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs

In reply to 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 "Drop thru" with "fall through" annotations, which is what GCC is expecting to find.

---
 drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +4 -4
index baed2b891efb..0eeed6c4c2ee 100644
@@ -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;
Signature · 1 line
2.17.1
#83 lore raw

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

Signature · 1 line
Gustavo
Quoted 52 lines · 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 "Drop thru" with "fall through" annotations, which is what GCC is expecting to find.

---
  drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +4 -4
index baed2b891efb..0eeed6c4c2ee 100644
@@ -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;
#84 lore raw

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

In reply to Gustavo A. R. Silva

Hi,

Friendly ping (second one):

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

Thanks
--
Gustavo

Quoted 52 lines · 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 "Drop thru" with "fall through" annotations, which is what GCC is expecting to find.

---
  drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +4 -4
index baed2b891efb..0eeed6c4c2ee 100644
@@ -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;
#85 lore raw

PATCH 28/41 scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs

In reply to 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 "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")

---
 drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +11 -9
index 3912a2d0b95d..cbcda5a91068 100644
@@ -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,
Signature · 1 line
2.17.1
#86 lore raw

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

Signature · 1 line
Gustavo
Quoted 120 lines · 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 "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")

---
  drivers/scsi/lpfc/lpfc_sli.c | 20 +++++++++++---------
  1 file changed, 11 insertions(+), 9 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +11 -9
index 3912a2d0b95d..cbcda5a91068 100644
@@ -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,

A message that is not in the archive (sent off-list or not yet received): CAGx+d6e+rCLjFEFCThgQwewod9Ni_wroV0cE_bceTXTFcsbe9A@mail.gmail.com

#88 lore raw

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

Dick,

Quoted 2 lines

Looks good.
Ack

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

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#89 lore raw

PATCH 29/41 scsi: megaraid: megaraid_sas_base: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/megaraid/megaraid_sas_base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/megaraid/megaraid_sas_base.c +1 -0
index b7d3fc6fb118..9db7aebc3564 100644
@@ -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:
Signature · 1 line
2.17.1
maintainer Acked-by on v1 29/41
#90 lore raw

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

Quoted 5 lines · Gustavo A. R. Silva

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

Quoted 19 lines
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/megaraid/megaraid_sas_base.c +1 -1
index b7d3fc6fb118..9db7aebc3564 100644
@@ -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

#91 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#92 lore raw

PATCH 30/41 scsi: megaraid_sas_fusion: Mark expected switch fall-through

In reply to 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 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.

---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -1
index c5e6bccb0895..8f37ad83be9a 100644
@@ -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) {
Signature · 1 line
2.17.1
maintainer Acked-by on v1 30/41
#93 lore raw

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

Quoted 10 lines · 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 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.

Quoted 20 lines
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -2
index c5e6bccb0895..8f37ad83be9a 100644
@@ -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

#94 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 7 lines

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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#95 lore raw

PATCH 31/41 scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1475400 ("Missing break in switch")

---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -0
index 5b9806d0719e..920b80ce4748 100644
@@ -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:
Signature · 1 line
2.17.1
#96 lore raw

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

Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1475400 ("Missing break in switch")

---
  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -0
index 5b9806d0719e..920b80ce4748 100644
@@ -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:
#97 lore raw

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

Quoted 34 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1475400 ("Missing break in switch")

---
  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -0
index 5b9806d0719e..920b80ce4748 100644
@@ -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:
#98 lore raw

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

Hi Suganath,

Quoted 6 lines · Suganath Prabu Subramani

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

#99 lore raw

PATCH 32/41 scsi: myrb: Mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/myrb.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/myrb.c +3 -0
index 0642f2d0a3bb..539ac8ce4fcd 100644
@@ -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 */
Signature · 1 line
2.17.1
#100 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 40 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/myrb.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/scsi/myrb.c +3 -0
index 0642f2d0a3bb..539ac8ce4fcd 100644
@@ -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 */
maintainer Reviewed-by
#101 lore raw

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

Quoted 22 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 11 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/myrb.c | 3 +++

  1 file changed, 3 insertions(+)

Cheers,

Hannes

#102 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 2 lines

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

Applied to 4.21/scsi-queue. Thanks.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#103 lore raw

PATCH 33/41 scsi: osd: osd_initiator: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/osd/osd_initiator.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/osd/osd_initiator.c +2 -1
index 60cf7c5eb880..cb26f26d5ec1 100644
@@ -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;
Signature · 1 line
2.17.1
#104 lore raw

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

Quoted 4 lines · Gustavo A. R. Silva

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

Quoted 26 lines
---
 drivers/scsi/osd/osd_initiator.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/osd/osd_initiator.c +2 -1
index 60cf7c5eb880..cb26f26d5ec1 100644
@@ -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;
#106 lore raw

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

In reply to Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 30 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/osd/osd_initiator.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/osd/osd_initiator.c +2 -1
index 60cf7c5eb880..cb26f26d5ec1 100644
@@ -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;
#107 lore raw

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

Quoted 41 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 30 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/osd/osd_initiator.c | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/osd/osd_initiator.c +1 -0
index 60cf7c5eb880..cb26f26d5ec1 100644
@@ -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

drivers/scsi/osd/osd_initiator.c +1 -1
@@ -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;

#108 lore raw

PATCH 34/41 scsi: osst: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/osst.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/scsi/osst.c +6 -0
index 664c1238a87f..7e877b43785d 100644
@@ -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 */
Signature · 1 line
2.17.1
#109 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 63 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/osst.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/scsi/osst.c +6 -0
index 664c1238a87f..7e877b43785d 100644
@@ -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 */
#110 lore raw

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

Quoted 73 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 62 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/osst.c | 6 ++++++

  1 file changed, 6 insertions(+)
drivers/scsi/osst.c +0 -0
index 664c1238a87f..7e877b43785d 100644
@@ -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);

drivers/scsi/osst.c +0 -0
@@ -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;

drivers/scsi/osst.c +0 -0
@@ -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);

drivers/scsi/osst.c +0 -0
@@ -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);

drivers/scsi/osst.c +1 -0
@@ -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 */

#111 lore raw

PATCH 35/41 scsi: ppa: mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114988 ("Missing break in switch")

---
 drivers/scsi/ppa.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/ppa.c +1 -0
index ee86a0c62dbf..d29999ba5458 100644
@@ -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))) {
Signature · 1 line
2.17.1
#112 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 22 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114988 ("Missing break in switch")

---
  drivers/scsi/ppa.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/ppa.c +1 -0
index ee86a0c62dbf..d29999ba5458 100644
@@ -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))) {
#113 lore raw

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

Quoted 32 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 21 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114988 ("Missing break in switch")

---
  drivers/scsi/ppa.c | 1 +

  1 file changed, 1 insertion(+)
drivers/scsi/ppa.c +1 -0
index ee86a0c62dbf..d29999ba5458 100644
@@ -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))) {

#114 lore raw

PATCH 36/41 scsi: qla4xxx: ql4_os: mark expected switch fall-through

In reply to 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 "allow fall-through" with a "fall through" annotation, which is what GCC is expecting to find.

---
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla4xxx/ql4_os.c +1 -1
index 1c702cd22359..7fd3491ea2d9 100644
@@ -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);
 	}
Signature · 1 line
2.17.1
#115 lore raw

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

Quoted 26 lines · 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 "allow fall-through" with a "fall through" annotation, which is what GCC is expecting to find.

---
  drivers/scsi/qla4xxx/ql4_os.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla4xxx/ql4_os.c +1 -1
index 1c702cd22359..7fd3491ea2d9 100644
@@ -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);
  	}
maintainer Acked-by on v1 36/41
#116 lore raw

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

In reply to Gustavo A. R. Silva
Quoted 28 lines · On 11/28/18, 10:03 AM, "[email protected] on behalf of Gustavo…

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.

---
drivers/scsi/qla4xxx/ql4_os.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla4xxx/ql4_os.c +1 -1
index 1c702cd22359..7fd3491ea2d9 100644
@@ -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);
       }
Quoted 2 lines

--
2.17.1

Thanks.

#117 lore raw

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

Nilesh,

Quoted 6 lines
Quoted 6 lines

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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#118 lore raw

PATCH 37/41 scsi: st: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/st.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/scsi/st.c +4 -0
index 7ff22d3f03e3..7c7a742a5ef7 100644
@@ -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 */
Signature · 1 line
2.17.1
#119 lore raw

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

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks
--
Gustavo

Quoted 46 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/st.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/scsi/st.c +4 -0
index 7ff22d3f03e3..7c7a742a5ef7 100644
@@ -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 */
#120 lore raw

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

Quoted 57 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 46 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/st.c | 4 ++++

  1 file changed, 4 insertions(+)
drivers/scsi/st.c +0 -0
index 7ff22d3f03e3..7c7a742a5ef7 100644
@@ -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);

drivers/scsi/st.c +0 -0
@@ -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 */

drivers/scsi/st.c +0 -0
@@ -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 */

#121 lore raw

PATCH 38/41 scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114996 ("Missing break in switch")

---
 drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/sym53c8xx_2/sym_hipd.c +2 -0
index 0a2a54517b15..054fb0599263 100644
@@ -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;
Signature · 1 line
2.17.1
#122 lore raw

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

Quoted 30 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114996 ("Missing break in switch")

---
  drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/scsi/sym53c8xx_2/sym_hipd.c +2 -0
index 0a2a54517b15..054fb0599263 100644
@@ -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;
#123 lore raw

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

Quoted 41 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 30 lines · Gustavo A. R. Silva

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

Addresses-Coverity-ID: 114996 ("Missing break in switch")

---
  drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 ++

  1 file changed, 2 insertions(+)
drivers/scsi/sym53c8xx_2/sym_hipd.c +1 -0
index 0a2a54517b15..054fb0599263 100644
@@ -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;

drivers/scsi/sym53c8xx_2/sym_hipd.c +1 -0
@@ -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;

#124 lore raw

PATCH 39/41 scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through

In reply to Gustavo A. R. Silva

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

---
 drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/sym53c8xx_2/sym_nvram.c +1 -0
index 5662fbb3ff60..0d37b4f07b5e 100644
@@ -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;
Signature · 1 line
2.17.1
#125 lore raw

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

Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +
  1 file changed, 1 insertion(+)
drivers/scsi/sym53c8xx_2/sym_nvram.c +1 -0
index 5662fbb3ff60..0d37b4f07b5e 100644
@@ -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;
#126 lore raw

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

Quoted 32 lines · Gustavo A. R. Silva

Hi,

Friendly ping:

Who can ack or review this patch, please?

Thanks

Signature · 1 line
Gustavo
Quoted 21 lines · Gustavo A. R. Silva

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

---
  drivers/scsi/sym53c8xx_2/sym_nvram.c | 1 +

  1 file changed, 1 insertion(+)
drivers/scsi/sym53c8xx_2/sym_nvram.c +1 -0
index 5662fbb3ff60..0d37b4f07b5e 100644
@@ -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;

#127 lore raw

PATCH 40/41 scsi: ufs: ufshcd: mark expected switch fall-throughs

In reply to Gustavo A. R. Silva

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

Addresses-Coverity-ID: 1087954 ("Missing break in switch")

---
 drivers/scsi/ufs/ufshcd.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/ufs/ufshcd.c +3 -0
index 003d489f1b4b..be207197b63f 100644
@@ -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 |
Signature · 1 line
2.17.1
#128 lore raw

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

Quoted 50 lines

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

---
 drivers/scsi/ufs/ufshcd.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/ufs/ufshcd.c +3 -0
index 003d489f1b4b..be207197b63f 100644
@@ -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

#129 lore raw

PATCH 41/41 scsi: xen-scsifront: mark expected switch fall-through

In reply to 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 "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.

---
 drivers/scsi/xen-scsifront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/xen-scsifront.c +1 -1
index 61389bdc7926..bb76d0d2022b 100644
@@ -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;
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 41/41
#130 lore raw

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

Quoted 10 lines · 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 "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.

Juergen

maintainer Reviewed-by on v1 41/41
#131 lore raw

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

In reply to Gustavo A. R. Silva
Quoted 10 lines · 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 "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.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#132 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 8 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#133 lore raw

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

In reply to Gustavo A. R. Silva

Gustavo A.,

Quoted 8 lines

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!

Signature · 6 lines
Martin K. Petersen	Oracle Linux Engineering

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#134 lore raw

PATCH 41/41 scsi: xen-scsifront: mark expected switch fall-through

In reply to 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 "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.

---
 drivers/scsi/xen-scsifront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/xen-scsifront.c +1 -1
index 61389bdc7926..bb76d0d2022b 100644
@@ -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;
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#135 lore raw
In reply to Gustavo A. R. Silva

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

Quoted 99 lines · Gustavo A. R. Silva

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 ++++
Quoted 9 lines
  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(-)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#136 lore raw

Hi Gustavo,

Quoted 1 line

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

I applied the patches that got acked or reviewed by their respective driver maintainers.

If you haven't received feedback on a patch you should poke the relevant driver maintainer.

Signature · 6 lines
Martin K. Petersen	Oracle Linux Engineering

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#137 lore raw
Quoted 4 lines · Martin K. Petersen

If you haven't received feedback on a patch you should poke the relevant driver maintainer.

Got it. Will do so.

Thanks
--
Gustavo

A message that is not in the archive (sent off-list or not yet received): [email protected]

#141 lore raw

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

Artur,

Quoted 8 lines · Gustavo A. R. Silva
Quoted 5 lines

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

Addresses-Coverity-ID: 703127 ("Missing break in switch")

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

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering

A message that is not in the archive (sent off-list or not yet received): [email protected]

#143 lore raw

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

Quoted 8 lines · 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, 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.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#145 lore raw

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

Quoted 8 lines · 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, 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.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#147 lore raw

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

Quoted 8 lines · 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, 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.