Remove set but not used variables.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
        struct Scsi_Host  *shost = class_to_shost(dev);\
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
        struct lpfc_hba   *phba = vport->phba;\
-       uint val = 0;\
-       val = phba->cfg_##attr;\
        return snprintf(buf, PAGE_SIZE, "%d\n",\
                        phba->cfg_##attr);\
 }
 { \
        struct Scsi_Host  *shost = class_to_shost(dev);\
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
-       uint val = 0;\
-       val = vport->cfg_##attr;\
        return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_##attr);\
 }
 
 { \
        struct Scsi_Host  *shost = class_to_shost(dev);\
        struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\
-       uint val = 0;\
-       val = vport->cfg_##attr;\
        return snprintf(buf, PAGE_SIZE, "%#x\n", vport->cfg_##attr);\
 }
 
 
 {
        uint32_t evt_req_id = 0;
        uint32_t cmd;
-       uint32_t len;
        struct lpfc_dmabuf *dmabuf = NULL;
        struct lpfc_bsg_event *evt;
        struct event_data *evt_dat = NULL;
        ct_req = (struct lpfc_sli_ct_request *)dmabuf->virt;
        evt_req_id = ct_req->FsType;
        cmd = ct_req->CommandResponse.bits.CmdRsp;
-       len = ct_req->CommandResponse.bits.Size;
        if (!(phba->sli3_options & LPFC_SLI3_HBQ_ENABLED))
                lpfc_sli_ringpostbuf_put(phba, pring, dmabuf);
 
 {
        struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata;
        struct lpfc_hba *phba = vport->phba;
-       struct diag_mode_test *diag_mode;
        struct lpfc_bsg_event *evt;
        struct event_data *evdat;
        struct lpfc_sli *psli = &phba->sli;
                rc = -EINVAL;
                goto loopback_test_exit;
        }
-       diag_mode = (struct diag_mode_test *)
-               job->request->rqst_data.h_vendor.vendor_cmd;
 
        if ((phba->link_state == LPFC_HBA_ERROR) ||
            (psli->sli_flag & LPFC_BLOCK_MGMT_IO) ||
 {
        struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata;
        struct lpfc_hba *phba = vport->phba;
-       struct get_mgmt_rev *event_req;
        struct get_mgmt_rev_reply *event_reply;
        int rc = 0;
 
                goto job_error;
        }
 
-       event_req = (struct get_mgmt_rev *)
-               job->request->rqst_data.h_vendor.vendor_cmd;
-
        event_reply = (struct get_mgmt_rev_reply *)
                job->reply->reply_data.vendor_reply.vendor_rsp;
 
 lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct fc_bsg_job *job,
                        struct lpfc_dmabuf *dmabuf)
 {
-       struct lpfc_sli_config_mbox *sli_cfg_mbx;
        struct bsg_job_data *dd_data = NULL;
        LPFC_MBOXQ_t *pmboxq = NULL;
        MAILBOX_t *pmb;
        phba->mbox_ext_buf_ctx.seqNum++;
        nemb_tp = phba->mbox_ext_buf_ctx.nembType;
 
-       sli_cfg_mbx = (struct lpfc_sli_config_mbox *)
-                       phba->mbox_ext_buf_ctx.mbx_dmabuf->virt;
-
        dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
        if (!dd_data) {
                rc = -ENOMEM;
        uint32_t transmit_length, receive_length, mode;
        struct lpfc_mbx_sli4_config *sli4_config;
        struct lpfc_mbx_nembed_cmd *nembed_sge;
-       struct mbox_header *header;
        struct ulp_bde64 *bde;
        uint8_t *ext = NULL;
        int rc = 0;
                                /* rebuild the command for sli4 using our
                                 * own buffers like we do for biu diags
                                 */
-                               header = (struct mbox_header *)
-                                               &pmb->un.varWords[0];
                                nembed_sge = (struct lpfc_mbx_nembed_cmd *)
                                                &pmb->un.varWords[0];
                                receive_length = nembed_sge->sge[0].length;
        IOCB_t *cmd;
        int rc = 0;
        struct menlo_command *menlo_cmd;
-       struct menlo_response *menlo_resp;
        struct lpfc_dmabuf *bmp = NULL, *cmp = NULL, *rmp = NULL;
        int request_nseg;
        int reply_nseg;
        menlo_cmd = (struct menlo_command *)
                job->request->rqst_data.h_vendor.vendor_cmd;
 
-       menlo_resp = (struct menlo_response *)
-               job->reply->reply_data.vendor_reply.vendor_rsp;
-
        /* allocate our bsg tracking structure */
        dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
        if (!dd_data) {
 
        struct lpfc_vport *vport = cmdiocb->vport;
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        IOCB_t *irsp;
-       struct lpfc_dmabuf *bmp;
        struct lpfc_dmabuf *outp;
        struct lpfc_sli_ct_request *CTrsp;
        struct lpfc_nodelist *ndlp;
        cmdiocb->context_un.rsp_iocb = rspiocb;
 
        outp = (struct lpfc_dmabuf *) cmdiocb->context2;
-       bmp = (struct lpfc_dmabuf *) cmdiocb->context3;
        irsp = &rspiocb->iocb;
 
        lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT,
        case SLI_MGMT_RPRT:
        case SLI_MGMT_RPA:
                {
-                       lpfc_vpd_t *vp;
                        struct serv_parm *hsp;
                        int len = 0;
 
-                       vp = &phba->vpd;
-
                        if (cmdcode == SLI_MGMT_RPRT) {
                                rh = (struct lpfc_fdmi_reg_hba *)
                                        &CtReq->un.PortID;
 
        struct lpfc_hba  *phba = vport->phba;
        LPFC_MBOXQ_t *mboxq;
        struct lpfc_nodelist *ndlp;
-       struct serv_parm *sp;
        struct lpfc_dmabuf *dmabuf;
        int rc = 0;
 
-       sp = &phba->fc_fabparam;
        /* move forward in case of SLI4 FC port loopback test and pt2pt mode */
        if ((phba->sli_rev == LPFC_SLI_REV4) &&
            !(phba->link_flag & LS_LOOPBACK_MODE) &&
        struct serv_parm *sp;
        IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli_ring *pring;
        uint8_t *pcmd;
        uint16_t cmdsize;
        uint32_t tmo;
        int rc;
 
-       pring = &phba->sli.ring[LPFC_ELS_RING];
-
        cmdsize = (sizeof(uint32_t) + sizeof(struct serv_parm));
        elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
                                     ndlp->nlp_DID, ELS_CMD_FLOGI);
 void
 lpfc_more_plogi(struct lpfc_vport *vport)
 {
-       int sentplogi;
-
        if (vport->num_disc_nodes)
                vport->num_disc_nodes--;
 
        /* Check to see if there are more PLOGIs to be sent */
        if (vport->fc_flag & FC_NLP_MORE)
                /* go thru NPR nodes and issue any remaining ELS PLOGIs */
-               sentplogi = lpfc_els_disc_plogi(vport);
+               lpfc_els_disc_plogi(vport);
 
        return;
 }
 {
        struct lpfc_hba  *phba = vport->phba;
        struct serv_parm *sp;
-       IOCB_t *icmd;
        struct lpfc_nodelist *ndlp;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        int ret;
 
-       psli = &phba->sli;
-
        ndlp = lpfc_findnode_did(vport, did);
        if (ndlp && !NLP_CHK_NODE_ACT(ndlp))
                ndlp = NULL;
        if (!elsiocb)
                return 1;
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
 
        /* For PLOGI request, remainder of payload is service parameters */
        struct lpfc_vport *vport = cmdiocb->vport;
        struct Scsi_Host  *shost = lpfc_shost_from_vport(vport);
        IOCB_t *irsp;
-       struct lpfc_sli *psli;
        struct lpfc_nodelist *ndlp;
 
-       psli = &phba->sli;
        /* we pass cmdiocb to state machine which needs rspiocb as well */
        cmdiocb->context_un.rsp_iocb = rspiocb;
 
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        struct lpfc_hba *phba = vport->phba;
        PRLI *npr;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
        uint8_t *pcmd;
        uint16_t cmdsize;
        if (!elsiocb)
                return 1;
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
 
        /* For PRLI request, remainder of payload is service parameters */
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        struct lpfc_hba  *phba = vport->phba;
        ADISC *ap;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
        uint8_t *pcmd;
        uint16_t cmdsize;
        if (!elsiocb)
                return 1;
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
 
        /* For ADISC request, remainder of payload is service parameters */
        struct lpfc_vport *vport = ndlp->vport;
        struct Scsi_Host  *shost = lpfc_shost_from_vport(vport);
        IOCB_t *irsp;
-       struct lpfc_sli *psli;
        struct lpfcMboxq *mbox;
        unsigned long flags;
        uint32_t skip_recovery = 0;
 
-       psli = &phba->sli;
        /* we pass cmdiocb to state machine which needs rspiocb as well */
        cmdiocb->context_un.rsp_iocb = rspiocb;
 
 {
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        struct lpfc_hba  *phba = vport->phba;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
        uint8_t *pcmd;
        uint16_t cmdsize;
        if (!elsiocb)
                return 1;
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
        *((uint32_t *) (pcmd)) = ELS_CMD_LOGO;
        pcmd += sizeof(uint32_t);
 lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
 {
        struct lpfc_hba  *phba = vport->phba;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        struct lpfc_nodelist *ndlp;
 
-       psli = &phba->sli;
        cmdsize = (sizeof(uint32_t) + sizeof(SCR));
 
        ndlp = lpfc_findnode_did(vport, nportid);
                return 1;
        }
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
 
        *((uint32_t *) (pcmd)) = ELS_CMD_SCR;
 lpfc_issue_els_farpr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
 {
        struct lpfc_hba  *phba = vport->phba;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        FARP *fp;
        uint8_t *pcmd;
        uint32_t *lp;
        struct lpfc_nodelist *ondlp;
        struct lpfc_nodelist *ndlp;
 
-       psli = &phba->sli;
        cmdsize = (sizeof(uint32_t) + sizeof(FARP));
 
        ndlp = lpfc_findnode_did(vport, nportid);
                return 1;
        }
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
 
        *((uint32_t *) (pcmd)) = ELS_CMD_FARPR;
        IOCB_t *icmd;
        IOCB_t *oldcmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        int rc;
        ELS_PKT *els_pkt_ptr;
 
-       psli = &phba->sli;
        oldcmd = &oldiocb->iocb;
 
        switch (flag) {
        IOCB_t *icmd;
        IOCB_t *oldcmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        int rc;
 
-       psli = &phba->sli;
        cmdsize = 2 * sizeof(uint32_t);
        elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
                                     ndlp->nlp_DID, ELS_CMD_LS_RJT);
        IOCB_t *icmd;
        IOCB_t *oldcmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        int rc;
 
-       psli = &phba->sli;
-
        cmdsize = sizeof(uint32_t) + sizeof(PRLI);
        elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
                ndlp->nlp_DID, (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)));
        RNID *rn;
        IOCB_t *icmd, *oldcmd;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        int rc;
 
-       psli = &phba->sli;
        cmdsize = sizeof(uint32_t) + sizeof(uint32_t)
                                        + (2 * sizeof(struct lpfc_name));
        if (format)
 {
        struct lpfc_hba  *phba = vport->phba;
        struct lpfc_iocbq *elsiocb;
-       struct lpfc_sli *psli;
        uint8_t *pcmd;
        uint16_t cmdsize;
        int rc;
 
-       psli = &phba->sli;
        cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len;
 
        /* The accumulated length can exceed the BPL_SIZE.  For
 {
        struct lpfc_hba *phba = vport->phba;
        struct lpfc_dmabuf *pcmd;
-       IOCB_t *icmd;
        uint8_t *lp;
        struct fc_lcb_request_frame *beacon;
        struct lpfc_lcb_context *lcb_context;
        uint8_t state, rjt_err;
        struct ls_rjt stat;
 
-       icmd = &cmdiocb->iocb;
        pcmd = (struct lpfc_dmabuf *)cmdiocb->context2;
        lp = (uint8_t *)pcmd->virt;
        beacon = (struct fc_lcb_request_frame *)pcmd->virt;
        struct lpfc_hba  *phba = vport->phba;
        struct lpfc_dmabuf *pcmd;
        uint32_t *lp, *datap;
-       IOCB_t *icmd;
        uint32_t payload_len, length, nportid, *cmd;
        int rscn_cnt;
        int rscn_id = 0, hba_id = 0;
        int i;
 
-       icmd = &cmdiocb->iocb;
        pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
        lp = (uint32_t *) pcmd->virt;
 
 {
        struct lpfc_dmabuf *pcmd;
        uint32_t *lp;
-       IOCB_t *icmd;
        RNID *rn;
        struct ls_rjt stat;
        uint32_t cmd;
 
-       icmd = &cmdiocb->iocb;
        pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
        lp = (uint32_t *) pcmd->virt;
 
 {
        struct lpfc_hba *phba = vport->phba;
        LPFC_MBOXQ_t *mbox;
-       struct lpfc_dmabuf *pcmd;
        struct ls_rjt stat;
 
        if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) &&
                /* reject the unsolicited RPS request and done with it */
                goto reject_out;
 
-       pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
-
        mbox = mempool_alloc(phba->mbox_mem_pool, GFP_ATOMIC);
        if (mbox) {
                lpfc_read_lnk_stat(phba, mbox);
 {
        struct lpfc_hba  *phba = vport->phba;
        struct RRQ *els_rrq;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
        uint8_t *pcmd;
        uint16_t cmdsize;
        if (!elsiocb)
                return 1;
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
 
        /* For RRQ request, remainder of payload is Exchange IDs */
 {
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        struct lpfc_hba  *phba = vport->phba;
-       IOCB_t *icmd;
        struct lpfc_iocbq *elsiocb;
        uint8_t *pcmd;
        uint16_t cmdsize;
        if (!elsiocb)
                return 1;
 
-       icmd = &elsiocb->iocb;
        pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
        *((uint32_t *) (pcmd)) = ELS_CMD_LOGO;
        pcmd += sizeof(uint32_t);
 
        struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
        struct lpfc_hba  *phba = vport->phba;
        struct lpfc_nodelist *ndlp, *next_ndlp;
-       int  rc;
 
        list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
                if (!NLP_CHK_NODE_ACT(ndlp))
                if ((phba->sli_rev < LPFC_SLI_REV4) &&
                    (!remove && ndlp->nlp_type & NLP_FABRIC))
                        continue;
-               rc = lpfc_disc_state_machine(vport, ndlp, NULL,
-                                            remove
-                                            ? NLP_EVT_DEVICE_RM
-                                            : NLP_EVT_DEVICE_RECOVERY);
+               lpfc_disc_state_machine(vport, ndlp, NULL,
+                                       remove
+                                       ? NLP_EVT_DEVICE_RM
+                                       : NLP_EVT_DEVICE_RECOVERY);
        }
        if (phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) {
                if (phba->sli_rev == LPFC_SLI_REV4)
                             uint16_t *next_fcf_index)
 {
        void *virt_addr;
-       dma_addr_t phys_addr;
        struct lpfc_mbx_sge sge;
        struct lpfc_mbx_read_fcf_tbl *read_fcf;
        uint32_t shdr_status, shdr_add_status, if_type;
         * routine only uses a single SGE.
         */
        lpfc_sli4_mbx_sge_get(mboxq, 0, &sge);
-       phys_addr = getPaddr(sge.pa_hi, sge.pa_lo);
        if (unlikely(!mboxq->sge_array)) {
                lpfc_printf_log(phba, KERN_ERR, LOG_MBOX,
                                "2524 Failed to get the non-embedded SGE "
 
        struct lpfc_hba   *phba;
        struct lpfc_vport *vport = NULL;
        struct Scsi_Host  *shost = NULL;
-       int error, ret;
+       int error;
        uint32_t cfg_mode, intr_mode;
        int adjusted_fcp_io_channel;
 
 
        /* check for firmware upgrade or downgrade */
        if (phba->cfg_request_firmware_upgrade)
-               ret = lpfc_sli4_request_firmware_update(phba, INT_FW_UPGRADE);
+               lpfc_sli4_request_firmware_update(phba, INT_FW_UPGRADE);
 
        /* Check if there are static vports to be created. */
        lpfc_create_static_vport(phba);
 
                   struct lpfc_dmabuf *mp)
 {
        MAILBOX_t *mb;
-       struct lpfc_sli *psli;
 
-       psli = &phba->sli;
        mb = &pmb->u.mb;
        memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
 
               LPFC_MBOXQ_t * pmb, uint32_t topology, uint32_t linkspeed)
 {
        lpfc_vpd_t *vpd;
-       struct lpfc_sli *psli;
        MAILBOX_t *mb;
 
        mb = &pmb->u.mb;
        memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
 
-       psli = &phba->sli;
        switch (topology) {
        case FLAGS_TOPOLOGY_MODE_LOOP_PT:
                mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP;
 {
        struct lpfc_dmabuf *mp;
        MAILBOX_t *mb;
-       struct lpfc_sli *psli;
 
-       psli = &phba->sli;
        mb = &pmb->u.mb;
        memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
 
                           uint16_t fcf_index)
 {
        void *virt_addr;
-       dma_addr_t phys_addr;
        uint8_t *bytep;
        struct lpfc_mbx_sge sge;
        uint32_t alloc_len, req_len;
         * routine only uses a single SGE.
         */
        lpfc_sli4_mbx_sge_get(mboxq, 0, &sge);
-       phys_addr = getPaddr(sge.pa_hi, sge.pa_lo);
        virt_addr = mboxq->sge_array->addr[0];
        read_fcf = (struct lpfc_mbx_read_fcf_tbl *)virt_addr;
 
 
 {
        struct lpfc_hba *phba;
        LPFC_MBOXQ_t *pmb = (LPFC_MBOXQ_t *) arg;
-       MAILBOX_t *mb;
        uint16_t rpi;
 
        phba = vport->phba;
        if (!(phba->pport->load_flag & FC_UNLOADING) &&
                (evt == NLP_EVT_CMPL_REG_LOGIN) &&
                (!pmb->u.mb.mbxStatus)) {
-               mb = &pmb->u.mb;
                rpi = pmb->u.mb.un.varWords[0];
                lpfc_release_rpi(phba, vport, rpi);
        }
 
                uint32_t *reftag, uint16_t *apptag, uint32_t new_guard)
 {
        struct scatterlist *sgpe; /* s/g prot entry */
-       struct scatterlist *sgde; /* s/g data entry */
        struct lpfc_scsi_buf *lpfc_cmd = NULL;
        struct scsi_dif_tuple *src = NULL;
        struct lpfc_nodelist *ndlp;
                return 0;
 
        sgpe = scsi_prot_sglist(sc);
-       sgde = scsi_sglist(sc);
        lba = scsi_get_lba(sc);
 
        /* First check if we need to match the LBA */
 #endif
        uint32_t checking = 1;
        uint32_t reftag;
-       unsigned blksize;
        uint8_t txop, rxop;
 
        status  = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop);
                goto out;
 
        /* extract some info from the scsi command for pde*/
-       blksize = lpfc_cmd_blksize(sc);
        reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */
 
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
        dma_addr_t physaddr;
        int i = 0, num_sge = 0, status;
        uint32_t reftag;
-       unsigned blksize;
        uint8_t txop, rxop;
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
        uint32_t rc;
                goto out;
 
        /* extract some info from the scsi command for pde*/
-       blksize = lpfc_cmd_blksize(sc);
        reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */
 
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
        struct scsi_cmnd *cmd = lpfc_cmd->pCmd;
        struct scsi_dif_tuple *src = NULL;
        uint8_t *data_src = NULL;
-       uint16_t guard_tag, guard_type;
+       uint16_t guard_tag;
        uint16_t start_app_tag, app_tag;
        uint32_t start_ref_tag, ref_tag;
        int prot, protsegcnt;
                data_len = sgde->length;
                if ((data_len & (blksize - 1)) == 0)
                        chk_guard = 1;
-               guard_type = scsi_host_get_guard(cmd->device->host);
 
                src = (struct scsi_dif_tuple *)sg_virt(sgpe);
                start_ref_tag = (uint32_t)scsi_get_lba(cmd); /* Truncate LBA */
        struct lpfc_rport_data *rdata = lpfc_cmd->rdata;
        struct lpfc_nodelist *pnode = rdata->pnode;
        struct scsi_cmnd *cmd;
-       int result;
        int depth;
        unsigned long flags;
        struct lpfc_fast_path_event *fast_path_evt;
        struct Scsi_Host *shost;
-       uint32_t queue_depth, scsi_id;
        uint32_t logit = LOG_FCP;
 
        /* Sanity check on return of outstanding command */
        }
 
        lpfc_update_stats(phba, lpfc_cmd);
-       result = cmd->result;
        if (vport->cfg_max_scsicmpl_time &&
           time_after(jiffies, lpfc_cmd->start_time +
                msecs_to_jiffies(vport->cfg_max_scsicmpl_time))) {
        lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd);
 
        /* The sdev is not guaranteed to be valid post scsi_done upcall. */
-       queue_depth = cmd->device->queue_depth;
-       scsi_id = cmd->device->id;
        cmd->scsi_done(cmd);
 
        if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
 
        struct lpfc_eqe *eqe;
        unsigned long iflag;
        int ecount = 0;
-       uint32_t eqidx;
 
        /* Get the driver's phba structure from the dev_id */
        fcp_eq_hdl = (struct lpfc_fcp_eq_hdl *)dev_id;
        phba = fcp_eq_hdl->phba;
-       eqidx = fcp_eq_hdl->idx;
 
        if (unlikely(!phba))
                return IRQ_NONE;
 static void __iomem *
 lpfc_dual_chute_pci_bar_map(struct lpfc_hba *phba, uint16_t pci_barset)
 {
-       struct pci_dev *pdev;
-
        if (!phba->pcidev)
                return NULL;
-       else
-               pdev = phba->pcidev;
 
        switch (pci_barset) {
        case WQ_PCI_BAR_0_AND_1:
        LPFC_MBOXQ_t *mboxq;
        uint8_t *bytep;
        void *virt_addr;
-       dma_addr_t phys_addr;
        struct lpfc_mbx_sge sge;
        uint32_t alloc_len, req_len;
        uint32_t fcfindex;
         * routine only uses a single SGE.
         */
        lpfc_sli4_mbx_sge_get(mboxq, 0, &sge);
-       phys_addr = getPaddr(sge.pa_hi, sge.pa_lo);
        virt_addr = mboxq->sge_array->addr[0];
        /*
         * Configure the FCF record for FCFI 0.  This is the driver's