public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] scsi: lpfc: remove redundant pointer lp
@ 2022-11-08 18:36 James Smart
  2022-11-17 18:07 ` Martin K. Petersen
  2022-11-26  3:27 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: James Smart @ 2022-11-08 18:36 UTC (permalink / raw)
  To: linux-scsi; +Cc: James Smart, Colin Ian King

From:   Colin Ian King <colin.i.king@gmail.com>

Pointer lp is being initialized and incremented but the result
is never read. The pointer is redundant and can be removed.

Once lp is removed, pcmd is not longer used. So removed pcmd as well

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>

---
lp removal by Colin left as is.
I added the pcmd mod on top of it.
---
 drivers/scsi/lpfc/lpfc_els.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 2b03210264bb..9326340d4226 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -9172,15 +9172,10 @@ static int
 lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
 		   struct lpfc_nodelist  *ndlp)
 {
-	struct lpfc_dmabuf *pcmd;
-	uint32_t *lp;
 	uint32_t did;
 
 	did = get_job_els_rsp64_did(vport->phba, cmdiocb);
-	pcmd = cmdiocb->cmd_dmabuf;
-	lp = (uint32_t *)pcmd->virt;
 
-	lp++;
 	/* FARP-RSP received from DID <did> */
 	lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
 			 "0600 FARP-RSP received from DID x%x\n", did);
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] scsi: lpfc: remove redundant pointer lp
  2022-11-08 18:36 [PATCH v2] scsi: lpfc: remove redundant pointer lp James Smart
@ 2022-11-17 18:07 ` Martin K. Petersen
  2022-11-26  3:27 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-11-17 18:07 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi, Colin Ian King


James,

> Pointer lp is being initialized and incremented but the result is
> never read. The pointer is redundant and can be removed.
>
> Once lp is removed, pcmd is not longer used. So removed pcmd as well

Applied to 6.2/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] scsi: lpfc: remove redundant pointer lp
  2022-11-08 18:36 [PATCH v2] scsi: lpfc: remove redundant pointer lp James Smart
  2022-11-17 18:07 ` Martin K. Petersen
@ 2022-11-26  3:27 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-11-26  3:27 UTC (permalink / raw)
  To: James Smart, linux-scsi; +Cc: Martin K . Petersen, Colin Ian King

On Tue, 8 Nov 2022 10:36:20 -0800, James Smart wrote:

> From:   Colin Ian King <colin.i.king@gmail.com>
> 
> Pointer lp is being initialized and incremented but the result
> is never read. The pointer is redundant and can be removed.
> 
> Once lp is removed, pcmd is not longer used. So removed pcmd as well
> 
> [...]

Applied to 6.2/scsi-queue, thanks!

[1/1] scsi: lpfc: remove redundant pointer lp
      https://git.kernel.org/mkp/scsi/c/729c287e9f74

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-26  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 18:36 [PATCH v2] scsi: lpfc: remove redundant pointer lp James Smart
2022-11-17 18:07 ` Martin K. Petersen
2022-11-26  3:27 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox