]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/scsi/qla2xxx/qla_iocb.c
qla2xxx: Remove set-but-not-used variables
[mirror_ubuntu-zesty-kernel.git] / drivers / scsi / qla2xxx / qla_iocb.c
index d58ffb79c064e1ceb4882941eddb1f9c8a1ad517..e95162e1fcb75483c54a133d94fb643737a2c0a4 100644 (file)
@@ -310,7 +310,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
 int
 qla2x00_start_scsi(srb_t *sp)
 {
-       int             ret, nseg;
+       int             nseg;
        unsigned long   flags;
        scsi_qla_host_t *vha;
        struct scsi_cmnd *cmd;
@@ -327,7 +327,6 @@ qla2x00_start_scsi(srb_t *sp)
        struct rsp_que *rsp;
 
        /* Setup device pointers. */
-       ret = 0;
        vha = sp->fcport->vha;
        ha = vha->hw;
        reg = &ha->iobase->isp;
@@ -710,7 +709,6 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
        struct scsi_cmnd *cmd;
        struct scatterlist *sg;
        int i;
-       struct req_que *req;
 
        cmd = GET_CMD_SP(sp);
 
@@ -725,7 +723,6 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
        }
 
        vha = sp->fcport->vha;
-       req = vha->req;
 
        /* Set transfer direction */
        if (cmd->sc_data_direction == DMA_TO_DEVICE) {
@@ -933,11 +930,9 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
        dma_addr_t      sle_dma;
        uint32_t        sle_dma_len, tot_prot_dma_len = 0;
        struct scsi_cmnd *cmd;
-       struct scsi_qla_host *vha;
 
        memset(&sgx, 0, sizeof(struct qla2_sgx));
        if (sp) {
-               vha = sp->fcport->vha;
                cmd = GET_CMD_SP(sp);
                prot_int = cmd->device->sector_size;
 
@@ -947,7 +942,6 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
 
                sg_prot = scsi_prot_sglist(cmd);
        } else if (tc) {
-               vha = tc->vha;
                prot_int      = tc->blk_sz;
                sgx.tot_bytes = tc->bufflen;
                sgx.cur_sg    = tc->sg;
@@ -1047,15 +1041,12 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd,
        int     i;
        uint16_t        used_dsds = tot_dsds;
        struct scsi_cmnd *cmd;
-       struct scsi_qla_host *vha;
 
        if (sp) {
                cmd = GET_CMD_SP(sp);
                sgl = scsi_sglist(cmd);
-               vha = sp->fcport->vha;
        } else if (tc) {
                sgl = tc->sg;
-               vha = tc->vha;
        } else {
                BUG();
                return 1;
@@ -1231,7 +1222,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
        uint32_t                *cur_dsd, *fcp_dl;
        scsi_qla_host_t         *vha;
        struct scsi_cmnd        *cmd;
-       int                     sgc;
        uint32_t                total_bytes = 0;
        uint32_t                data_bytes;
        uint32_t                dif_bytes;
@@ -1247,7 +1237,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
 
        cmd = GET_CMD_SP(sp);
 
-       sgc = 0;
        /* Update entry type to indicate Command Type CRC_2 IOCB */
        *((uint32_t *)(&cmd_pkt->entry_type)) =
            __constant_cpu_to_le32(COMMAND_TYPE_CRC_2);
@@ -1442,7 +1431,7 @@ crc_queuing_error:
 int
 qla24xx_start_scsi(srb_t *sp)
 {
-       int             ret, nseg;
+       int             nseg;
        unsigned long   flags;
        uint32_t        *clr_ptr;
        uint32_t        index;
@@ -1458,8 +1447,6 @@ qla24xx_start_scsi(srb_t *sp)
        struct qla_hw_data *ha = vha->hw;
 
        /* Setup device pointers. */
-       ret = 0;
-
        qla25xx_set_que(sp, &rsp);
        req = vha->req;
 
@@ -2088,7 +2075,6 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
        struct qla_hw_data *ha = vha->hw;
        struct fc_bsg_job *bsg_job = sp->u.bsg_job;
        int loop_iterartion = 0;
-       int cont_iocb_prsnt = 0;
        int entry_count = 1;
 
        memset(ct_iocb, 0, sizeof(ms_iocb_entry_t));
@@ -2139,7 +2125,6 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
                            vha->hw->req_q_map[0]);
                        cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
                        avail_dsds = 5;
-                       cont_iocb_prsnt = 1;
                        entry_count++;
                }
 
@@ -2167,7 +2152,6 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
        struct qla_hw_data *ha = vha->hw;
        struct fc_bsg_job *bsg_job = sp->u.bsg_job;
        int loop_iterartion = 0;
-       int cont_iocb_prsnt = 0;
        int entry_count = 1;
 
        ct_iocb->entry_type = CT_IOCB_TYPE;
@@ -2214,7 +2198,6 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
                            ha->req_q_map[0]);
                        cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
                        avail_dsds = 5;
-                       cont_iocb_prsnt = 1;
                        entry_count++;
                }
 
@@ -2237,7 +2220,7 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
 int
 qla82xx_start_scsi(srb_t *sp)
 {
-       int             ret, nseg;
+       int             nseg;
        unsigned long   flags;
        struct scsi_cmnd *cmd;
        uint32_t        *clr_ptr;
@@ -2257,7 +2240,6 @@ qla82xx_start_scsi(srb_t *sp)
        struct rsp_que *rsp = NULL;
 
        /* Setup device pointers. */
-       ret = 0;
        reg = &ha->iobase->isp82;
        cmd = GET_CMD_SP(sp);
        req = vha->req;