Skip to contentSkip to conversation

qla2xxx: Remove non functional code

PATCH Applied Daniel Wagner 4 participants 4 messages Feb 6, 2020 – Mar 27, 2020

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

PATCH 1/1 qla2xxx: Remove non functional code

Remove code which has no functional use anymore since 3c75ad1d87c7 ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss").

While at it remove also the stale function documentation.

---
 drivers/scsi/qla2xxx/qla_os.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +0 -23
index 79387ac8936f..27a5d0c7e246 100644
@@ -3909,19 +3909,6 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport,
 	set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
 }
 
-/*
- * qla2x00_mark_all_devices_lost
- *	Updates fcport state when device goes offline.
- *
- * Input:
- *	ha = adapter block pointer.
- *	fcport = port structure pointer.
- *
- * Return:
- *	None.
- *
- * Context:
- */
 void
 qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 {
@@ -3933,16 +3920,6 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 	list_for_each_entry(fcport, &vha->vp_fcports, list) {
 		fcport->scan_state = 0;
 		qlt_schedule_sess_for_deletion(fcport);
-
-		if (vha->vp_idx != 0 && vha->vp_idx != fcport->vha->vp_idx)
-			continue;
-
-		/*
-		 * No point in marking the device as lost, if the device is
-		 * already DEAD.
-		 */
-		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD)
-			continue;
 	}
 }
 
Signature · 1 line
2.16.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 43 lines · Daniel Wagner

Remove code which has no functional use anymore since 3c75ad1d87c7 ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss").

While at it remove also the stale function documentation.

---
 drivers/scsi/qla2xxx/qla_os.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +0 -16
index 79387ac8936f..27a5d0c7e246 100644
@@ -3909,19 +3909,6 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport,
 	set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
 }
 
-/*
- * qla2x00_mark_all_devices_lost
- *	Updates fcport state when device goes offline.
- *
- * Input:
- *	ha = adapter block pointer.
- *	fcport = port structure pointer.
- *
- * Return:
- *	None.
- *
- * Context:
- */
 void
 qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 {
@@ -3933,16 +3920,6 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 	list_for_each_entry(fcport, &vha->vp_fcports, list) {
 		fcport->scan_state = 0;
 		qlt_schedule_sess_for_deletion(fcport);
-
-		if (vha->vp_idx != 0 && vha->vp_idx != fcport->vha->vp_idx)
-			continue;

drivers/scsi/qla2xxx/qla_os.c qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha) · line 3925

Quoted 10 lines
drivers/scsi/qla2xxx/qla_os.c +0 -7
-
-		/*
-		 * No point in marking the device as lost, if the device is
-		 * already DEAD.
-		 */
-		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD)
-			continue;
 	}
 }
 
Reviewed-by on v1 1/1
#2 lore raw
In reply to Daniel Wagner
Quoted 43 lines · Daniel Wagner

Remove code which has no functional use anymore since 3c75ad1d87c7 ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss").

While at it remove also the stale function documentation.

---
 drivers/scsi/qla2xxx/qla_os.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +0 -16
index 79387ac8936f..27a5d0c7e246 100644
@@ -3909,19 +3909,6 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport,
 	set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
 }
 
-/*
- * qla2x00_mark_all_devices_lost
- *	Updates fcport state when device goes offline.
- *
- * Input:
- *	ha = adapter block pointer.
- *	fcport = port structure pointer.
- *
- * Return:
- *	None.
- *
- * Context:
- */
 void
 qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 {
@@ -3933,16 +3920,6 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
 	list_for_each_entry(fcport, &vha->vp_fcports, list) {
 		fcport->scan_state = 0;
 		qlt_schedule_sess_for_deletion(fcport);
-
-		if (vha->vp_idx != 0 && vha->vp_idx != fcport->vha->vp_idx)
-			continue;

drivers/scsi/qla2xxx/qla_os.c qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha) · line 3925

Quoted 10 lines
drivers/scsi/qla2xxx/qla_os.c +0 -7
-
-		/*
-		 * No point in marking the device as lost, if the device is
-		 * already DEAD.
-		 */
-		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD)
-			continue;
 	}
 }
 

Looks good. Thanks Daniel.

#3 lore raw
In reply to Daniel Wagner

Daniel,

Quoted 2 lines

Remove code which has no functional use anymore since 3c75ad1d87c7 ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss").

Applied to 5.7/scsi-queue, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering