Skip to contentSkip to conversation

scsi: lpfc: lpfc_nvmet.c: Fix Use plain integer as NULL pointer

PATCH Applied James Smart 2 participants 2 messages Oct 24, 2019 – Oct 25, 2019 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20191024030857.GA12097@saurav

James Smart

author Reviewed-by
#1 lore raw
Quoted 21 lines · Saurav Girepunje

Replace assignment of 0 to pointer with NULL assignment.

---
  drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_nvmet.c +1 -1
index faa596f9e861..f6ebfe05224c 100644
@@ -3364,7 +3364,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba,
  	/* ABTS WQE must go to the same WQ as the WQE to be aborted */
  	abts_wqeq->hba_wqidx = ctxp->wqeq->hba_wqidx;
  	abts_wqeq->wqe_cmpl = lpfc_nvmet_sol_fcp_abort_cmp;
-	abts_wqeq->iocb_cmpl = 0;
+	abts_wqeq->iocb_cmpl = NULL;
  	abts_wqeq->iocb_flag |= LPFC_IO_NVME;
  	abts_wqeq->context2 = ctxp;
  	abts_wqeq->vport = phba->pport;

drivers/scsi/lpfc/lpfc_nvmet.c lpfc_nvmet_unsol_ls_issue_abort(struct lpfc_hba *phba, · line 3505

Quoted 8 lines
drivers/scsi/lpfc/lpfc_nvmet.c +1 -1
@@ -3499,7 +3499,7 @@ lpfc_nvmet_unsol_ls_issue_abort(struct lpfc_hba *phba,
 
  	spin_lock_irqsave(&phba->hbalock, flags);
  	abts_wqeq->wqe_cmpl = lpfc_nvmet_xmt_ls_abort_cmp;
-	abts_wqeq->iocb_cmpl = 0;
+	abts_wqeq->iocb_cmpl = NULL;
  	abts_wqeq->iocb_flag |=  LPFC_IO_NVME_LS;
  	rc = lpfc_sli4_issue_wqe(phba, ctxp->hdwq, abts_wqeq);
  	spin_unlock_irqrestore(&phba->hbalock, flags);

Thanks

-- james