scsi: qla2xxx: Remove superfluous sts_entry_* casts
[linux-2.6-block.git] / drivers / scsi / qla2xxx / qla_isr.c
index 78aec50abe0f828561e320a88d7d8f12c4f03d29..5c65f2e67448298652b59fcf070d587140945a27 100644 (file)
@@ -776,7 +776,6 @@ skip_rio:
        case MBA_LOOP_INIT_ERR:
                ql_log(ql_log_warn, vha, 0x5090,
                    "LOOP INIT ERROR (%x).\n", mb[1]);
-               ha->isp_ops->fw_dump(vha, 1);
                set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
                break;
 
@@ -1514,7 +1513,7 @@ qla2x00_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
                    if (comp_status == CS_DATA_UNDERRUN) {
                            res = DID_OK << 16;
                            bsg_reply->reply_payload_rcv_len =
-                               le16_to_cpu(((sts_entry_t *)pkt)->rsp_info_len);
+                               le16_to_cpu(pkt->rsp_info_len);
 
                            ql_log(ql_log_warn, vha, 0x5048,
                                "CT pass-through-%s error comp_status=0x%x total_byte=0x%x.\n",
@@ -2257,11 +2256,8 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
        struct bsg_job *bsg_job = NULL;
        struct fc_bsg_request *bsg_request;
        struct fc_bsg_reply *bsg_reply;
-       sts_entry_t *sts;
-       struct sts_entry_24xx *sts24;
-
-       sts = (sts_entry_t *) pkt;
-       sts24 = (struct sts_entry_24xx *) pkt;
+       sts_entry_t *sts = pkt;
+       struct sts_entry_24xx *sts24 = pkt;
 
        /* Validate handle. */
        if (index >= req->num_outstanding_cmds) {
@@ -2407,8 +2403,8 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
        srb_t           *sp;
        fc_port_t       *fcport;
        struct scsi_cmnd *cp;
-       sts_entry_t *sts;
-       struct sts_entry_24xx *sts24;
+       sts_entry_t *sts = pkt;
+       struct sts_entry_24xx *sts24 = pkt;
        uint16_t        comp_status;
        uint16_t        scsi_status;
        uint16_t        ox_id;
@@ -2426,8 +2422,6 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
        uint16_t state_flags = 0;
        uint16_t retry_delay = 0;
 
-       sts = (sts_entry_t *) pkt;
-       sts24 = (struct sts_entry_24xx *) pkt;
        if (IS_FWI2_CAPABLE(ha)) {
                comp_status = le16_to_cpu(sts24->comp_status);
                scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK;
@@ -2727,7 +2721,7 @@ check_scsi_status:
                                "Port to be marked lost on fcport=%02x%02x%02x, current "
                                "port state= %s comp_status %x.\n", fcport->d_id.b.domain,
                                fcport->d_id.b.area, fcport->d_id.b.al_pa,
-                               port_state_str[atomic_read(&fcport->state)],
+                               port_state_str[FCS_ONLINE],
                                comp_status);
 
                        qla2x00_mark_device_lost(fcport->vha, fcport, 1, 1);
@@ -2787,6 +2781,8 @@ out:
 
        if (rsp->status_srb == NULL)
                sp->done(sp, res);
+       else
+               WARN_ON_ONCE(true);
 }
 
 /**
@@ -2844,6 +2840,8 @@ qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
        if (sense_len == 0) {
                rsp->status_srb = NULL;
                sp->done(sp, cp->result);
+       } else {
+               WARN_ON_ONCE(true);
        }
 }