Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lpfc: remove set but not used variables

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>

authored by

Sebastian Herbszt and committed by
James Bottomley
db6f1c2f 3bb11fc5

+8 -126
-6
drivers/scsi/lpfc/lpfc_attr.c
··· 1642 1642 struct Scsi_Host *shost = class_to_shost(dev);\ 1643 1643 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\ 1644 1644 struct lpfc_hba *phba = vport->phba;\ 1645 - uint val = 0;\ 1646 - val = phba->cfg_##attr;\ 1647 1645 return snprintf(buf, PAGE_SIZE, "%d\n",\ 1648 1646 phba->cfg_##attr);\ 1649 1647 } ··· 1806 1808 { \ 1807 1809 struct Scsi_Host *shost = class_to_shost(dev);\ 1808 1810 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\ 1809 - uint val = 0;\ 1810 - val = vport->cfg_##attr;\ 1811 1811 return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_##attr);\ 1812 1812 } 1813 1813 ··· 1831 1835 { \ 1832 1836 struct Scsi_Host *shost = class_to_shost(dev);\ 1833 1837 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;\ 1834 - uint val = 0;\ 1835 - val = vport->cfg_##attr;\ 1836 1838 return snprintf(buf, PAGE_SIZE, "%#x\n", vport->cfg_##attr);\ 1837 1839 } 1838 1840
-20
drivers/scsi/lpfc/lpfc_bsg.c
··· 904 904 { 905 905 uint32_t evt_req_id = 0; 906 906 uint32_t cmd; 907 - uint32_t len; 908 907 struct lpfc_dmabuf *dmabuf = NULL; 909 908 struct lpfc_bsg_event *evt; 910 909 struct event_data *evt_dat = NULL; ··· 945 946 ct_req = (struct lpfc_sli_ct_request *)dmabuf->virt; 946 947 evt_req_id = ct_req->FsType; 947 948 cmd = ct_req->CommandResponse.bits.CmdRsp; 948 - len = ct_req->CommandResponse.bits.Size; 949 949 if (!(phba->sli3_options & LPFC_SLI3_HBQ_ENABLED)) 950 950 lpfc_sli_ringpostbuf_put(phba, pring, dmabuf); 951 951 ··· 2986 2988 { 2987 2989 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; 2988 2990 struct lpfc_hba *phba = vport->phba; 2989 - struct diag_mode_test *diag_mode; 2990 2991 struct lpfc_bsg_event *evt; 2991 2992 struct event_data *evdat; 2992 2993 struct lpfc_sli *psli = &phba->sli; ··· 3028 3031 rc = -EINVAL; 3029 3032 goto loopback_test_exit; 3030 3033 } 3031 - diag_mode = (struct diag_mode_test *) 3032 - job->request->rqst_data.h_vendor.vendor_cmd; 3033 3034 3034 3035 if ((phba->link_state == LPFC_HBA_ERROR) || 3035 3036 (psli->sli_flag & LPFC_BLOCK_MGMT_IO) || ··· 3288 3293 { 3289 3294 struct lpfc_vport *vport = (struct lpfc_vport *)job->shost->hostdata; 3290 3295 struct lpfc_hba *phba = vport->phba; 3291 - struct get_mgmt_rev *event_req; 3292 3296 struct get_mgmt_rev_reply *event_reply; 3293 3297 int rc = 0; 3294 3298 ··· 3299 3305 rc = -EINVAL; 3300 3306 goto job_error; 3301 3307 } 3302 - 3303 - event_req = (struct get_mgmt_rev *) 3304 - job->request->rqst_data.h_vendor.vendor_cmd; 3305 3308 3306 3309 event_reply = (struct get_mgmt_rev_reply *) 3307 3310 job->reply->reply_data.vendor_reply.vendor_rsp; ··· 4339 4348 lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct fc_bsg_job *job, 4340 4349 struct lpfc_dmabuf *dmabuf) 4341 4350 { 4342 - struct lpfc_sli_config_mbox *sli_cfg_mbx; 4343 4351 struct bsg_job_data *dd_data = NULL; 4344 4352 LPFC_MBOXQ_t *pmboxq = NULL; 4345 4353 MAILBOX_t *pmb; ··· 4351 4361 index = phba->mbox_ext_buf_ctx.seqNum; 4352 4362 phba->mbox_ext_buf_ctx.seqNum++; 4353 4363 nemb_tp = phba->mbox_ext_buf_ctx.nembType; 4354 - 4355 - sli_cfg_mbx = (struct lpfc_sli_config_mbox *) 4356 - phba->mbox_ext_buf_ctx.mbx_dmabuf->virt; 4357 4364 4358 4365 dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL); 4359 4366 if (!dd_data) { ··· 4593 4606 uint32_t transmit_length, receive_length, mode; 4594 4607 struct lpfc_mbx_sli4_config *sli4_config; 4595 4608 struct lpfc_mbx_nembed_cmd *nembed_sge; 4596 - struct mbox_header *header; 4597 4609 struct ulp_bde64 *bde; 4598 4610 uint8_t *ext = NULL; 4599 4611 int rc = 0; ··· 4790 4804 /* rebuild the command for sli4 using our 4791 4805 * own buffers like we do for biu diags 4792 4806 */ 4793 - header = (struct mbox_header *) 4794 - &pmb->un.varWords[0]; 4795 4807 nembed_sge = (struct lpfc_mbx_nembed_cmd *) 4796 4808 &pmb->un.varWords[0]; 4797 4809 receive_length = nembed_sge->sge[0].length; ··· 5032 5048 IOCB_t *cmd; 5033 5049 int rc = 0; 5034 5050 struct menlo_command *menlo_cmd; 5035 - struct menlo_response *menlo_resp; 5036 5051 struct lpfc_dmabuf *bmp = NULL, *cmp = NULL, *rmp = NULL; 5037 5052 int request_nseg; 5038 5053 int reply_nseg; ··· 5070 5087 5071 5088 menlo_cmd = (struct menlo_command *) 5072 5089 job->request->rqst_data.h_vendor.vendor_cmd; 5073 - 5074 - menlo_resp = (struct menlo_response *) 5075 - job->reply->reply_data.vendor_reply.vendor_rsp; 5076 5090 5077 5091 /* allocate our bsg tracking structure */ 5078 5092 dd_data = kmalloc(sizeof(struct bsg_job_data), GFP_KERNEL);
-5
drivers/scsi/lpfc/lpfc_ct.c
··· 575 575 struct lpfc_vport *vport = cmdiocb->vport; 576 576 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 577 577 IOCB_t *irsp; 578 - struct lpfc_dmabuf *bmp; 579 578 struct lpfc_dmabuf *outp; 580 579 struct lpfc_sli_ct_request *CTrsp; 581 580 struct lpfc_nodelist *ndlp; ··· 587 588 cmdiocb->context_un.rsp_iocb = rspiocb; 588 589 589 590 outp = (struct lpfc_dmabuf *) cmdiocb->context2; 590 - bmp = (struct lpfc_dmabuf *) cmdiocb->context3; 591 591 irsp = &rspiocb->iocb; 592 592 593 593 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, ··· 1731 1733 case SLI_MGMT_RPRT: 1732 1734 case SLI_MGMT_RPA: 1733 1735 { 1734 - lpfc_vpd_t *vp; 1735 1736 struct serv_parm *hsp; 1736 1737 int len = 0; 1737 - 1738 - vp = &phba->vpd; 1739 1738 1740 1739 if (cmdcode == SLI_MGMT_RPRT) { 1741 1740 rh = (struct lpfc_fdmi_reg_hba *)
+1 -55
drivers/scsi/lpfc/lpfc_els.c
··· 457 457 struct lpfc_hba *phba = vport->phba; 458 458 LPFC_MBOXQ_t *mboxq; 459 459 struct lpfc_nodelist *ndlp; 460 - struct serv_parm *sp; 461 460 struct lpfc_dmabuf *dmabuf; 462 461 int rc = 0; 463 462 464 - sp = &phba->fc_fabparam; 465 463 /* move forward in case of SLI4 FC port loopback test and pt2pt mode */ 466 464 if ((phba->sli_rev == LPFC_SLI_REV4) && 467 465 !(phba->link_flag & LS_LOOPBACK_MODE) && ··· 1203 1205 struct serv_parm *sp; 1204 1206 IOCB_t *icmd; 1205 1207 struct lpfc_iocbq *elsiocb; 1206 - struct lpfc_sli_ring *pring; 1207 1208 uint8_t *pcmd; 1208 1209 uint16_t cmdsize; 1209 1210 uint32_t tmo; 1210 1211 int rc; 1211 - 1212 - pring = &phba->sli.ring[LPFC_ELS_RING]; 1213 1212 1214 1213 cmdsize = (sizeof(uint32_t) + sizeof(struct serv_parm)); 1215 1214 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp, ··· 1449 1454 void 1450 1455 lpfc_more_plogi(struct lpfc_vport *vport) 1451 1456 { 1452 - int sentplogi; 1453 - 1454 1457 if (vport->num_disc_nodes) 1455 1458 vport->num_disc_nodes--; 1456 1459 ··· 1461 1468 /* Check to see if there are more PLOGIs to be sent */ 1462 1469 if (vport->fc_flag & FC_NLP_MORE) 1463 1470 /* go thru NPR nodes and issue any remaining ELS PLOGIs */ 1464 - sentplogi = lpfc_els_disc_plogi(vport); 1471 + lpfc_els_disc_plogi(vport); 1465 1472 1466 1473 return; 1467 1474 } ··· 1949 1956 { 1950 1957 struct lpfc_hba *phba = vport->phba; 1951 1958 struct serv_parm *sp; 1952 - IOCB_t *icmd; 1953 1959 struct lpfc_nodelist *ndlp; 1954 1960 struct lpfc_iocbq *elsiocb; 1955 - struct lpfc_sli *psli; 1956 1961 uint8_t *pcmd; 1957 1962 uint16_t cmdsize; 1958 1963 int ret; 1959 - 1960 - psli = &phba->sli; 1961 1964 1962 1965 ndlp = lpfc_findnode_did(vport, did); 1963 1966 if (ndlp && !NLP_CHK_NODE_ACT(ndlp)) ··· 1966 1977 if (!elsiocb) 1967 1978 return 1; 1968 1979 1969 - icmd = &elsiocb->iocb; 1970 1980 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 1971 1981 1972 1982 /* For PLOGI request, remainder of payload is service parameters */ ··· 2022 2034 struct lpfc_vport *vport = cmdiocb->vport; 2023 2035 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 2024 2036 IOCB_t *irsp; 2025 - struct lpfc_sli *psli; 2026 2037 struct lpfc_nodelist *ndlp; 2027 2038 2028 - psli = &phba->sli; 2029 2039 /* we pass cmdiocb to state machine which needs rspiocb as well */ 2030 2040 cmdiocb->context_un.rsp_iocb = rspiocb; 2031 2041 ··· 2103 2117 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 2104 2118 struct lpfc_hba *phba = vport->phba; 2105 2119 PRLI *npr; 2106 - IOCB_t *icmd; 2107 2120 struct lpfc_iocbq *elsiocb; 2108 2121 uint8_t *pcmd; 2109 2122 uint16_t cmdsize; ··· 2113 2128 if (!elsiocb) 2114 2129 return 1; 2115 2130 2116 - icmd = &elsiocb->iocb; 2117 2131 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2118 2132 2119 2133 /* For PRLI request, remainder of payload is service parameters */ ··· 2397 2413 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 2398 2414 struct lpfc_hba *phba = vport->phba; 2399 2415 ADISC *ap; 2400 - IOCB_t *icmd; 2401 2416 struct lpfc_iocbq *elsiocb; 2402 2417 uint8_t *pcmd; 2403 2418 uint16_t cmdsize; ··· 2407 2424 if (!elsiocb) 2408 2425 return 1; 2409 2426 2410 - icmd = &elsiocb->iocb; 2411 2427 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2412 2428 2413 2429 /* For ADISC request, remainder of payload is service parameters */ ··· 2460 2478 struct lpfc_vport *vport = ndlp->vport; 2461 2479 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 2462 2480 IOCB_t *irsp; 2463 - struct lpfc_sli *psli; 2464 2481 struct lpfcMboxq *mbox; 2465 2482 unsigned long flags; 2466 2483 uint32_t skip_recovery = 0; 2467 2484 2468 - psli = &phba->sli; 2469 2485 /* we pass cmdiocb to state machine which needs rspiocb as well */ 2470 2486 cmdiocb->context_un.rsp_iocb = rspiocb; 2471 2487 ··· 2589 2609 { 2590 2610 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 2591 2611 struct lpfc_hba *phba = vport->phba; 2592 - IOCB_t *icmd; 2593 2612 struct lpfc_iocbq *elsiocb; 2594 2613 uint8_t *pcmd; 2595 2614 uint16_t cmdsize; ··· 2607 2628 if (!elsiocb) 2608 2629 return 1; 2609 2630 2610 - icmd = &elsiocb->iocb; 2611 2631 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2612 2632 *((uint32_t *) (pcmd)) = ELS_CMD_LOGO; 2613 2633 pcmd += sizeof(uint32_t); ··· 2720 2742 lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry) 2721 2743 { 2722 2744 struct lpfc_hba *phba = vport->phba; 2723 - IOCB_t *icmd; 2724 2745 struct lpfc_iocbq *elsiocb; 2725 - struct lpfc_sli *psli; 2726 2746 uint8_t *pcmd; 2727 2747 uint16_t cmdsize; 2728 2748 struct lpfc_nodelist *ndlp; 2729 2749 2730 - psli = &phba->sli; 2731 2750 cmdsize = (sizeof(uint32_t) + sizeof(SCR)); 2732 2751 2733 2752 ndlp = lpfc_findnode_did(vport, nportid); ··· 2751 2776 return 1; 2752 2777 } 2753 2778 2754 - icmd = &elsiocb->iocb; 2755 2779 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2756 2780 2757 2781 *((uint32_t *) (pcmd)) = ELS_CMD_SCR; ··· 2810 2836 lpfc_issue_els_farpr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry) 2811 2837 { 2812 2838 struct lpfc_hba *phba = vport->phba; 2813 - IOCB_t *icmd; 2814 2839 struct lpfc_iocbq *elsiocb; 2815 - struct lpfc_sli *psli; 2816 2840 FARP *fp; 2817 2841 uint8_t *pcmd; 2818 2842 uint32_t *lp; ··· 2818 2846 struct lpfc_nodelist *ondlp; 2819 2847 struct lpfc_nodelist *ndlp; 2820 2848 2821 - psli = &phba->sli; 2822 2849 cmdsize = (sizeof(uint32_t) + sizeof(FARP)); 2823 2850 2824 2851 ndlp = lpfc_findnode_did(vport, nportid); ··· 2843 2872 return 1; 2844 2873 } 2845 2874 2846 - icmd = &elsiocb->iocb; 2847 2875 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2848 2876 2849 2877 *((uint32_t *) (pcmd)) = ELS_CMD_FARPR; ··· 3892 3922 IOCB_t *icmd; 3893 3923 IOCB_t *oldcmd; 3894 3924 struct lpfc_iocbq *elsiocb; 3895 - struct lpfc_sli *psli; 3896 3925 uint8_t *pcmd; 3897 3926 uint16_t cmdsize; 3898 3927 int rc; 3899 3928 ELS_PKT *els_pkt_ptr; 3900 3929 3901 - psli = &phba->sli; 3902 3930 oldcmd = &oldiocb->iocb; 3903 3931 3904 3932 switch (flag) { ··· 4029 4061 IOCB_t *icmd; 4030 4062 IOCB_t *oldcmd; 4031 4063 struct lpfc_iocbq *elsiocb; 4032 - struct lpfc_sli *psli; 4033 4064 uint8_t *pcmd; 4034 4065 uint16_t cmdsize; 4035 4066 int rc; 4036 4067 4037 - psli = &phba->sli; 4038 4068 cmdsize = 2 * sizeof(uint32_t); 4039 4069 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp, 4040 4070 ndlp->nlp_DID, ELS_CMD_LS_RJT); ··· 4178 4212 IOCB_t *icmd; 4179 4213 IOCB_t *oldcmd; 4180 4214 struct lpfc_iocbq *elsiocb; 4181 - struct lpfc_sli *psli; 4182 4215 uint8_t *pcmd; 4183 4216 uint16_t cmdsize; 4184 4217 int rc; 4185 - 4186 - psli = &phba->sli; 4187 4218 4188 4219 cmdsize = sizeof(uint32_t) + sizeof(PRLI); 4189 4220 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp, ··· 4278 4315 RNID *rn; 4279 4316 IOCB_t *icmd, *oldcmd; 4280 4317 struct lpfc_iocbq *elsiocb; 4281 - struct lpfc_sli *psli; 4282 4318 uint8_t *pcmd; 4283 4319 uint16_t cmdsize; 4284 4320 int rc; 4285 4321 4286 - psli = &phba->sli; 4287 4322 cmdsize = sizeof(uint32_t) + sizeof(uint32_t) 4288 4323 + (2 * sizeof(struct lpfc_name)); 4289 4324 if (format) ··· 4408 4447 { 4409 4448 struct lpfc_hba *phba = vport->phba; 4410 4449 struct lpfc_iocbq *elsiocb; 4411 - struct lpfc_sli *psli; 4412 4450 uint8_t *pcmd; 4413 4451 uint16_t cmdsize; 4414 4452 int rc; 4415 4453 4416 - psli = &phba->sli; 4417 4454 cmdsize = oldiocb->iocb.unsli3.rcvsli3.acc_len; 4418 4455 4419 4456 /* The accumulated length can exceed the BPL_SIZE. For ··· 5140 5181 { 5141 5182 struct lpfc_hba *phba = vport->phba; 5142 5183 struct lpfc_dmabuf *pcmd; 5143 - IOCB_t *icmd; 5144 5184 uint8_t *lp; 5145 5185 struct fc_lcb_request_frame *beacon; 5146 5186 struct lpfc_lcb_context *lcb_context; 5147 5187 uint8_t state, rjt_err; 5148 5188 struct ls_rjt stat; 5149 5189 5150 - icmd = &cmdiocb->iocb; 5151 5190 pcmd = (struct lpfc_dmabuf *)cmdiocb->context2; 5152 5191 lp = (uint8_t *)pcmd->virt; 5153 5192 beacon = (struct fc_lcb_request_frame *)pcmd->virt; ··· 5438 5481 struct lpfc_hba *phba = vport->phba; 5439 5482 struct lpfc_dmabuf *pcmd; 5440 5483 uint32_t *lp, *datap; 5441 - IOCB_t *icmd; 5442 5484 uint32_t payload_len, length, nportid, *cmd; 5443 5485 int rscn_cnt; 5444 5486 int rscn_id = 0, hba_id = 0; 5445 5487 int i; 5446 5488 5447 - icmd = &cmdiocb->iocb; 5448 5489 pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; 5449 5490 lp = (uint32_t *) pcmd->virt; 5450 5491 ··· 5898 5943 { 5899 5944 struct lpfc_dmabuf *pcmd; 5900 5945 uint32_t *lp; 5901 - IOCB_t *icmd; 5902 5946 RNID *rn; 5903 5947 struct ls_rjt stat; 5904 5948 uint32_t cmd; 5905 5949 5906 - icmd = &cmdiocb->iocb; 5907 5950 pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; 5908 5951 lp = (uint32_t *) pcmd->virt; 5909 5952 ··· 6212 6259 { 6213 6260 struct lpfc_hba *phba = vport->phba; 6214 6261 LPFC_MBOXQ_t *mbox; 6215 - struct lpfc_dmabuf *pcmd; 6216 6262 struct ls_rjt stat; 6217 6263 6218 6264 if ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && 6219 6265 (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) 6220 6266 /* reject the unsolicited RPS request and done with it */ 6221 6267 goto reject_out; 6222 - 6223 - pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; 6224 6268 6225 6269 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_ATOMIC); 6226 6270 if (mbox) { ··· 6432 6482 { 6433 6483 struct lpfc_hba *phba = vport->phba; 6434 6484 struct RRQ *els_rrq; 6435 - IOCB_t *icmd; 6436 6485 struct lpfc_iocbq *elsiocb; 6437 6486 uint8_t *pcmd; 6438 6487 uint16_t cmdsize; ··· 6450 6501 if (!elsiocb) 6451 6502 return 1; 6452 6503 6453 - icmd = &elsiocb->iocb; 6454 6504 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 6455 6505 6456 6506 /* For RRQ request, remainder of payload is Exchange IDs */ ··· 8376 8428 { 8377 8429 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 8378 8430 struct lpfc_hba *phba = vport->phba; 8379 - IOCB_t *icmd; 8380 8431 struct lpfc_iocbq *elsiocb; 8381 8432 uint8_t *pcmd; 8382 8433 uint16_t cmdsize; ··· 8386 8439 if (!elsiocb) 8387 8440 return 1; 8388 8441 8389 - icmd = &elsiocb->iocb; 8390 8442 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 8391 8443 *((uint32_t *) (pcmd)) = ELS_CMD_LOGO; 8392 8444 pcmd += sizeof(uint32_t);
+4 -7
drivers/scsi/lpfc/lpfc_hbadisc.c
··· 800 800 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); 801 801 struct lpfc_hba *phba = vport->phba; 802 802 struct lpfc_nodelist *ndlp, *next_ndlp; 803 - int rc; 804 803 805 804 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { 806 805 if (!NLP_CHK_NODE_ACT(ndlp)) ··· 815 816 if ((phba->sli_rev < LPFC_SLI_REV4) && 816 817 (!remove && ndlp->nlp_type & NLP_FABRIC)) 817 818 continue; 818 - rc = lpfc_disc_state_machine(vport, ndlp, NULL, 819 - remove 820 - ? NLP_EVT_DEVICE_RM 821 - : NLP_EVT_DEVICE_RECOVERY); 819 + lpfc_disc_state_machine(vport, ndlp, NULL, 820 + remove 821 + ? NLP_EVT_DEVICE_RM 822 + : NLP_EVT_DEVICE_RECOVERY); 822 823 } 823 824 if (phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) { 824 825 if (phba->sli_rev == LPFC_SLI_REV4) ··· 1773 1774 uint16_t *next_fcf_index) 1774 1775 { 1775 1776 void *virt_addr; 1776 - dma_addr_t phys_addr; 1777 1777 struct lpfc_mbx_sge sge; 1778 1778 struct lpfc_mbx_read_fcf_tbl *read_fcf; 1779 1779 uint32_t shdr_status, shdr_add_status, if_type; ··· 1783 1785 * routine only uses a single SGE. 1784 1786 */ 1785 1787 lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); 1786 - phys_addr = getPaddr(sge.pa_hi, sge.pa_lo); 1787 1788 if (unlikely(!mboxq->sge_array)) { 1788 1789 lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, 1789 1790 "2524 Failed to get the non-embedded SGE "
+2 -2
drivers/scsi/lpfc/lpfc_init.c
··· 10282 10282 struct lpfc_hba *phba; 10283 10283 struct lpfc_vport *vport = NULL; 10284 10284 struct Scsi_Host *shost = NULL; 10285 - int error, ret; 10285 + int error; 10286 10286 uint32_t cfg_mode, intr_mode; 10287 10287 int adjusted_fcp_io_channel; 10288 10288 ··· 10406 10406 10407 10407 /* check for firmware upgrade or downgrade */ 10408 10408 if (phba->cfg_request_firmware_upgrade) 10409 - ret = lpfc_sli4_request_firmware_update(phba, INT_FW_UPGRADE); 10409 + lpfc_sli4_request_firmware_update(phba, INT_FW_UPGRADE); 10410 10410 10411 10411 /* Check if there are static vports to be created. */ 10412 10412 lpfc_create_static_vport(phba);
-8
drivers/scsi/lpfc/lpfc_mbox.c
··· 289 289 struct lpfc_dmabuf *mp) 290 290 { 291 291 MAILBOX_t *mb; 292 - struct lpfc_sli *psli; 293 292 294 - psli = &phba->sli; 295 293 mb = &pmb->u.mb; 296 294 memset(pmb, 0, sizeof (LPFC_MBOXQ_t)); 297 295 ··· 481 483 LPFC_MBOXQ_t * pmb, uint32_t topology, uint32_t linkspeed) 482 484 { 483 485 lpfc_vpd_t *vpd; 484 - struct lpfc_sli *psli; 485 486 MAILBOX_t *mb; 486 487 487 488 mb = &pmb->u.mb; 488 489 memset(pmb, 0, sizeof (LPFC_MBOXQ_t)); 489 490 490 - psli = &phba->sli; 491 491 switch (topology) { 492 492 case FLAGS_TOPOLOGY_MODE_LOOP_PT: 493 493 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; ··· 581 585 { 582 586 struct lpfc_dmabuf *mp; 583 587 MAILBOX_t *mb; 584 - struct lpfc_sli *psli; 585 588 586 - psli = &phba->sli; 587 589 mb = &pmb->u.mb; 588 590 memset(pmb, 0, sizeof (LPFC_MBOXQ_t)); 589 591 ··· 2004 2010 uint16_t fcf_index) 2005 2011 { 2006 2012 void *virt_addr; 2007 - dma_addr_t phys_addr; 2008 2013 uint8_t *bytep; 2009 2014 struct lpfc_mbx_sge sge; 2010 2015 uint32_t alloc_len, req_len; ··· 2032 2039 * routine only uses a single SGE. 2033 2040 */ 2034 2041 lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); 2035 - phys_addr = getPaddr(sge.pa_hi, sge.pa_lo); 2036 2042 virt_addr = mboxq->sge_array->addr[0]; 2037 2043 read_fcf = (struct lpfc_mbx_read_fcf_tbl *)virt_addr; 2038 2044
-2
drivers/scsi/lpfc/lpfc_nportdisc.c
··· 820 820 { 821 821 struct lpfc_hba *phba; 822 822 LPFC_MBOXQ_t *pmb = (LPFC_MBOXQ_t *) arg; 823 - MAILBOX_t *mb; 824 823 uint16_t rpi; 825 824 826 825 phba = vport->phba; ··· 827 828 if (!(phba->pport->load_flag & FC_UNLOADING) && 828 829 (evt == NLP_EVT_CMPL_REG_LOGIN) && 829 830 (!pmb->u.mb.mbxStatus)) { 830 - mb = &pmb->u.mb; 831 831 rpi = pmb->u.mb.un.varWords[0]; 832 832 lpfc_release_rpi(phba, vport, rpi); 833 833 }
+1 -13
drivers/scsi/lpfc/lpfc_scsi.c
··· 1293 1293 uint32_t *reftag, uint16_t *apptag, uint32_t new_guard) 1294 1294 { 1295 1295 struct scatterlist *sgpe; /* s/g prot entry */ 1296 - struct scatterlist *sgde; /* s/g data entry */ 1297 1296 struct lpfc_scsi_buf *lpfc_cmd = NULL; 1298 1297 struct scsi_dif_tuple *src = NULL; 1299 1298 struct lpfc_nodelist *ndlp; ··· 1308 1309 return 0; 1309 1310 1310 1311 sgpe = scsi_prot_sglist(sc); 1311 - sgde = scsi_sglist(sc); 1312 1312 lba = scsi_get_lba(sc); 1313 1313 1314 1314 /* First check if we need to match the LBA */ ··· 1880 1882 #endif 1881 1883 uint32_t checking = 1; 1882 1884 uint32_t reftag; 1883 - unsigned blksize; 1884 1885 uint8_t txop, rxop; 1885 1886 1886 1887 status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop); ··· 1887 1890 goto out; 1888 1891 1889 1892 /* extract some info from the scsi command for pde*/ 1890 - blksize = lpfc_cmd_blksize(sc); 1891 1893 reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */ 1892 1894 1893 1895 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS ··· 2259 2263 dma_addr_t physaddr; 2260 2264 int i = 0, num_sge = 0, status; 2261 2265 uint32_t reftag; 2262 - unsigned blksize; 2263 2266 uint8_t txop, rxop; 2264 2267 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS 2265 2268 uint32_t rc; ··· 2272 2277 goto out; 2273 2278 2274 2279 /* extract some info from the scsi command for pde*/ 2275 - blksize = lpfc_cmd_blksize(sc); 2276 2280 reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */ 2277 2281 2278 2282 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS ··· 2875 2881 struct scsi_cmnd *cmd = lpfc_cmd->pCmd; 2876 2882 struct scsi_dif_tuple *src = NULL; 2877 2883 uint8_t *data_src = NULL; 2878 - uint16_t guard_tag, guard_type; 2884 + uint16_t guard_tag; 2879 2885 uint16_t start_app_tag, app_tag; 2880 2886 uint32_t start_ref_tag, ref_tag; 2881 2887 int prot, protsegcnt; ··· 2916 2922 data_len = sgde->length; 2917 2923 if ((data_len & (blksize - 1)) == 0) 2918 2924 chk_guard = 1; 2919 - guard_type = scsi_host_get_guard(cmd->device->host); 2920 2925 2921 2926 src = (struct scsi_dif_tuple *)sg_virt(sgpe); 2922 2927 start_ref_tag = (uint32_t)scsi_get_lba(cmd); /* Truncate LBA */ ··· 3901 3908 struct lpfc_rport_data *rdata = lpfc_cmd->rdata; 3902 3909 struct lpfc_nodelist *pnode = rdata->pnode; 3903 3910 struct scsi_cmnd *cmd; 3904 - int result; 3905 3911 int depth; 3906 3912 unsigned long flags; 3907 3913 struct lpfc_fast_path_event *fast_path_evt; 3908 3914 struct Scsi_Host *shost; 3909 - uint32_t queue_depth, scsi_id; 3910 3915 uint32_t logit = LOG_FCP; 3911 3916 3912 3917 /* Sanity check on return of outstanding command */ ··· 4086 4095 } 4087 4096 4088 4097 lpfc_update_stats(phba, lpfc_cmd); 4089 - result = cmd->result; 4090 4098 if (vport->cfg_max_scsicmpl_time && 4091 4099 time_after(jiffies, lpfc_cmd->start_time + 4092 4100 msecs_to_jiffies(vport->cfg_max_scsicmpl_time))) { ··· 4122 4132 lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); 4123 4133 4124 4134 /* The sdev is not guaranteed to be valid post scsi_done upcall. */ 4125 - queue_depth = cmd->device->queue_depth; 4126 - scsi_id = cmd->device->id; 4127 4135 cmd->scsi_done(cmd); 4128 4136 4129 4137 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
-8
drivers/scsi/lpfc/lpfc_sli.c
··· 12491 12491 struct lpfc_eqe *eqe; 12492 12492 unsigned long iflag; 12493 12493 int ecount = 0; 12494 - uint32_t eqidx; 12495 12494 12496 12495 /* Get the driver's phba structure from the dev_id */ 12497 12496 fcp_eq_hdl = (struct lpfc_fcp_eq_hdl *)dev_id; 12498 12497 phba = fcp_eq_hdl->phba; 12499 - eqidx = fcp_eq_hdl->idx; 12500 12498 12501 12499 if (unlikely(!phba)) 12502 12500 return IRQ_NONE; ··· 12829 12831 static void __iomem * 12830 12832 lpfc_dual_chute_pci_bar_map(struct lpfc_hba *phba, uint16_t pci_barset) 12831 12833 { 12832 - struct pci_dev *pdev; 12833 - 12834 12834 if (!phba->pcidev) 12835 12835 return NULL; 12836 - else 12837 - pdev = phba->pcidev; 12838 12836 12839 12837 switch (pci_barset) { 12840 12838 case WQ_PCI_BAR_0_AND_1: ··· 15914 15920 LPFC_MBOXQ_t *mboxq; 15915 15921 uint8_t *bytep; 15916 15922 void *virt_addr; 15917 - dma_addr_t phys_addr; 15918 15923 struct lpfc_mbx_sge sge; 15919 15924 uint32_t alloc_len, req_len; 15920 15925 uint32_t fcfindex; ··· 15946 15953 * routine only uses a single SGE. 15947 15954 */ 15948 15955 lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); 15949 - phys_addr = getPaddr(sge.pa_hi, sge.pa_lo); 15950 15956 virt_addr = mboxq->sge_array->addr[0]; 15951 15957 /* 15952 15958 * Configure the FCF record for FCFI 0. This is the driver's