lpfc: fix low priority issues from fortify source code scan
Fixed Low priority issues from lpfc given by fortify source code scan. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:

committed by
Christoph Hellwig

parent
a2fc4aefa0
commit
eb01656688
@@ -1829,7 +1829,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
IOCB_t *irsp;
|
||||
struct lpfc_nodelist *ndlp;
|
||||
struct lpfc_dmabuf *prsp;
|
||||
int disc, rc, did, type;
|
||||
int disc, rc;
|
||||
|
||||
/* we pass cmdiocb to state machine which needs rspiocb as well */
|
||||
cmdiocb->context_un.rsp_iocb = rspiocb;
|
||||
@@ -1874,10 +1874,6 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* ndlp could be freed in DSM, save these values now */
|
||||
type = ndlp->nlp_type;
|
||||
did = ndlp->nlp_DID;
|
||||
|
||||
if (irsp->ulpStatus) {
|
||||
/* Check for retry */
|
||||
if (lpfc_els_retry(phba, cmdiocb, rspiocb)) {
|
||||
@@ -2270,8 +2266,6 @@ lpfc_adisc_done(struct lpfc_vport *vport)
|
||||
void
|
||||
lpfc_more_adisc(struct lpfc_vport *vport)
|
||||
{
|
||||
int sentadisc;
|
||||
|
||||
if (vport->num_disc_nodes)
|
||||
vport->num_disc_nodes--;
|
||||
/* Continue discovery with <num_disc_nodes> ADISCs to go */
|
||||
@@ -2284,7 +2278,7 @@ lpfc_more_adisc(struct lpfc_vport *vport)
|
||||
if (vport->fc_flag & FC_NLP_MORE) {
|
||||
lpfc_set_disctmo(vport);
|
||||
/* go thru NPR nodes and issue any remaining ELS ADISCs */
|
||||
sentadisc = lpfc_els_disc_adisc(vport);
|
||||
lpfc_els_disc_adisc(vport);
|
||||
}
|
||||
if (!vport->num_disc_nodes)
|
||||
lpfc_adisc_done(vport);
|
||||
@@ -3028,10 +3022,9 @@ lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp)
|
||||
{
|
||||
struct lpfc_vport *vport = ndlp->vport;
|
||||
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
|
||||
uint32_t cmd, did, retry;
|
||||
uint32_t cmd, retry;
|
||||
|
||||
spin_lock_irq(shost->host_lock);
|
||||
did = ndlp->nlp_DID;
|
||||
cmd = ndlp->nlp_last_elscmd;
|
||||
ndlp->nlp_last_elscmd = 0;
|
||||
|
||||
@@ -5289,10 +5282,9 @@ lpfc_els_rcv_rnid(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
||||
IOCB_t *icmd;
|
||||
RNID *rn;
|
||||
struct ls_rjt stat;
|
||||
uint32_t cmd, did;
|
||||
uint32_t cmd;
|
||||
|
||||
icmd = &cmdiocb->iocb;
|
||||
did = icmd->un.elsreq64.remoteID;
|
||||
pcmd = (struct lpfc_dmabuf *) cmdiocb->context2;
|
||||
lp = (uint32_t *) pcmd->virt;
|
||||
|
||||
|
Reference in New Issue
Block a user