lpfc: Remove unnecessary null ndlp check in lpfc_sli_prep_wqe()
Subsystems (2)
PATCH 1/1 lpfc: Remove unnecessary null ndlp check in lpfc_sli_prep_wqe()
Smatch had the following warning:drivers/scsi/lpfc/lpfc_sli.c:22305 lpfc_sli_prep_wqe() error: we previously assumed 'ndlp' could be null (see line 22298)
Remove the unnecessary null check
--- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_sli.c +1 -1
@@ -22284,7 +22284,7 @@ lpfc_sli_prep_wqe(struct lpfc_hba *phba, struct lpfc_iocbq *job)bf_set (wqe_ct, &wqe->els_req.wqe_com,1 );bf_set (wqe_ctxt_tag, &wqe->els_req.wqe_com, phba->vpi_ids[job->vport->vpi]); - }else if (pcmd && ndlp) { + }else if (pcmd) {bf_set (wqe_ct, &wqe->els_req.wqe_com,0 );bf_set (wqe_ctxt_tag, &wqe->els_req.wqe_com, phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
Signature · 1 line
2.26.2
Martin K. Petersen
AppliedJames,
Quoted 5 lines
Smatch had the following warning:
drivers/scsi/lpfc/lpfc_sli.c:22305lpfc_sli_prep_wqe()error: we previously assumed 'ndlp' could be null (see line 22298)Remove the unnecessary null check
Applied to 5.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 6 lines · James Smart
Smatch had the following warning:
drivers/scsi/lpfc/lpfc_sli.c:22305lpfc_sli_prep_wqe()error: we previously assumed 'ndlp' could be null (see line 22298)Remove the unnecessary null check
Applied to 5.19/scsi-queue, thanks!
[1/1] lpfc: Remove unnecessary null ndlp check in lpfc_sli_prep_wqe()
https://git.kernel.org/mkp/scsi/c/3d1d34ec1fbc
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering