[SCSI] qla2xxx: Fix warning reported by smatch.
authorSaurav Kashyap <saurav.kashyap@qlogic.com>
Thu, 7 Nov 2013 07:54:56 +0000 (02:54 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 19 Dec 2013 15:39:03 +0000 (07:39 -0800)
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_nx.c
drivers/scsi/qla2xxx/qla_nx2.c
drivers/scsi/qla2xxx/qla_os.c

index 00427e0ff5b2ae3370809f3a9433ba24d116aef3..1f426628a0a504a7dbba1fd1df3c84be28f3b9f7 100644 (file)
@@ -732,7 +732,7 @@ extern inline void qla8044_set_qsnt_ready(struct scsi_qla_host *vha);
 extern inline void qla8044_need_reset_handler(struct scsi_qla_host *vha);
 extern int qla8044_device_state_handler(struct scsi_qla_host *vha);
 extern void qla8044_clear_qsnt_ready(struct scsi_qla_host *vha);
-extern void qla8044_clear_drv_active(struct scsi_qla_host *vha);
+extern void qla8044_clear_drv_active(struct qla_hw_data *);
 void qla8044_get_minidump(struct scsi_qla_host *vha);
 int qla8044_collect_md_data(struct scsi_qla_host *vha);
 extern int qla8044_md_get_template(scsi_qla_host_t *);
index 1468c59d8960f3d93af4985d27428348e2565d8a..1e6ba4a369e2988f4d8041d4621065a0d01c8259 100644 (file)
@@ -3017,7 +3017,7 @@ qla8xxx_dev_failed_handler(scsi_qla_host_t *vha)
                qla82xx_clear_drv_active(ha);
                qla82xx_idc_unlock(ha);
        } else if (IS_QLA8044(ha)) {
-               qla8044_clear_drv_active(vha);
+               qla8044_clear_drv_active(ha);
                qla8044_idc_unlock(ha);
        }
 
index cc3522fbcaa2f25adeafc673862f06d8223101af..b45f4d78ee365477ddd531b9bb220ea4174f0d89 100644 (file)
@@ -1257,10 +1257,10 @@ exit_start_fw:
 }
 
 void
-qla8044_clear_drv_active(struct scsi_qla_host *vha)
+qla8044_clear_drv_active(struct qla_hw_data *ha)
 {
        uint32_t drv_active;
-       struct qla_hw_data *ha = vha->hw;
+       struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev);
 
        drv_active = qla8044_rd_direct(vha, QLA8044_CRB_DRV_ACTIVE_INDEX);
        drv_active &= ~(1 << (ha->portnum));
@@ -1324,7 +1324,7 @@ qla8044_device_bootstrap(struct scsi_qla_host *vha)
        if (rval != QLA_SUCCESS) {
                ql_log(ql_log_info, vha, 0xb0b3,
                     "%s: HW State: FAILED\n", __func__);
-               qla8044_clear_drv_active(vha);
+               qla8044_clear_drv_active(ha);
                qla8044_wr_direct(vha, QLA8044_CRB_DEV_STATE_INDEX,
                    QLA8XXX_DEV_FAILED);
                return rval;
@@ -1737,7 +1737,7 @@ qla8044_update_idc_reg(struct scsi_qla_host *vha)
 
        rval = qla8044_set_idc_ver(vha);
        if (rval == QLA_FUNCTION_FAILED)
-               qla8044_clear_drv_active(vha);
+               qla8044_clear_drv_active(ha);
        qla8044_idc_unlock(ha);
 
 exit_update_idc_reg:
index 20d58be7b8d570c0b2b32614ef8acbb176673caa..89a53002b58577e003cb5a3a499138a1111e9f53 100644 (file)
@@ -2881,7 +2881,7 @@ probe_hw_failed:
        }
        if (IS_QLA8044(ha)) {
                qla8044_idc_lock(ha);
-               qla8044_clear_drv_active(base_vha);
+               qla8044_clear_drv_active(ha);
                qla8044_idc_unlock(ha);
        }
 iospace_config_failed:
@@ -3045,7 +3045,7 @@ qla2x00_clear_drv_active(scsi_qla_host_t *vha)
 
        if (IS_QLA8044(ha)) {
                qla8044_idc_lock(ha);
-               qla8044_clear_drv_active(vha);
+               qla8044_clear_drv_active(ha);
                qla8044_idc_unlock(ha);
        } else if (IS_QLA82XX(ha)) {
                qla82xx_idc_lock(ha);