Skip to contentSkip to conversation

qla2xxx: Suppress gcc 7 fall-through warnings

PATCH Applied Bart Van Assche 2 participants 2 messages Dec 8, 2017 – Dec 12, 2017

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

PATCH 1/1 qla2xxx: Suppress gcc 7 fall-through warnings

Avoid that building with gcc 7 and W=1 triggers warnings similar to the following:

drivers/scsi/qla2xxx/qla_isr.c:1189:27: warning: this statement may fall through [-Wimplicit-fallthrough=]

Cc Himanshu Madhani <[email protected]>
Cc Quinn Tran <[email protected]>
Cc Hannes Reinecke <[email protected]>
---
 drivers/scsi/qla2xxx/qla_gs.c     | 2 +-
 drivers/scsi/qla2xxx/qla_isr.c    | 5 +++--
 drivers/scsi/qla2xxx/qla_sup.c    | 1 +
 drivers/scsi/qla2xxx/qla_target.c | 3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_gs.c +1 -1
index 7d715e58901f..07fe17a986b0 100644
@@ -177,7 +177,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *vha, ms_iocb_entry_t *ms_pkt,
 			break;
 		case CS_TIMEOUT:
 			rval = QLA_FUNCTION_TIMEOUT;
-			/* drop through */
+			/* fall through */
 		default:
 			ql_dbg(ql_dbg_disc, vha, 0x2033,
 			    "%s failed, completion status (%x) on port_id: "
drivers/scsi/qla2xxx/qla_isr.c +3 -2
index 85382387a52b..a55bfaa790a3 100644
@@ -1202,6 +1202,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
 				qla2xxx_wake_dpc(vha);
 			}
 		}
+		/* fall through */
 	case MBA_IDC_COMPLETE:
 		if (ha->notify_lb_portup_comp && !vha->vp_idx)
 			complete(&ha->lb_portup_comp);
@@ -1769,7 +1770,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
 				set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
 			qla2xxx_wake_dpc(vha);
 		}
-		/* drop through */
+		/* fall through */
 	default:
 		data[0] = MBS_COMMAND_ERROR;
 		break;
@@ -2967,9 +2968,9 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
 				    (response_t *)pkt);
 				break;
 			} else {
-				/* drop through */
 				qlt_24xx_process_atio_queue(vha, 1);
 			}
+			/* fall through */
 		case ABTS_RESP_24XX:
 		case CTIO_TYPE7:
 		case CTIO_CRC2:
drivers/scsi/qla2xxx/qla_sup.c +1 -0
index b4336e0cd85f..d2db86ea06b2 100644
@@ -2461,6 +2461,7 @@ qla2x00_write_optrom_data(struct scsi_qla_host *vha, uint8_t *buf,
 				sec_mask = 0x1e000;
 				break;
 			}
+			/* fall through */
 		default:
 			/* Default to 16 kb sector size. */
 			rest_addr = 0x3fff;
drivers/scsi/qla2xxx/qla_target.c +2 -1
index a23107b1ec06..067bcc57a9ad 100644
@@ -450,6 +450,7 @@ void qlt_response_pkt_all_vps(struct scsi_qla_host *vha,
 		ql_dbg(ql_dbg_tgt, vha, 0xe073,
 			"qla_target(%d):%s: CRC2 Response pkt\n",
 			vha->vp_idx, __func__);
+		/* fall through */
 	case CTIO_TYPE7:
 	{
 		struct ctio7_from_24xx *entry = (struct ctio7_from_24xx *)pkt;
@@ -4889,7 +4890,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha,
 			res = 1;
 			break;
 		}
-		/* drop through */
+		/* fall through */
 	case ELS_LOGO:
 	case ELS_PRLO:
 		spin_lock_irqsave(&ha->tgt.sess_lock, flags);
Signature · 1 line
2.15.0
#1 lore raw

Bart,

Quoted 2 lines

Avoid that building with gcc 7 and W=1 triggers warnings similar to the following:

/scsi/qla2xxx/qla_isr.c:1189:27: warning: this statement may fall through [-Wimplicit-fallthrough=]

Applied to 4.16/scsi-queue. Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering