* [PATCH] scsi: lpfc: remove redundant assignment of sgel
@ 2017-02-24 13:45 Colin King
2017-03-04 17:42 ` James Smart
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-02-24 13:45 UTC (permalink / raw)
To: James Smart, Dick Kennedy, James E . J . Bottomley,
Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
In the NVMET_FCOP_RSP case, sgel is assigned but never used and
hence is redundant and can be removed.
Detected by CoverityScan, CID#1411658 ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/lpfc/lpfc_nvmet.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index c421e17..e59a0a8 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -1445,7 +1445,6 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba,
case NVMET_FCOP_RSP:
/* Words 0 - 2 */
- sgel = &rsp->sg[0];
physaddr = rsp->rspdma;
wqe->fcp_trsp.bde.tus.f.bdeFlags = BUFF_TYPE_BDE_64;
wqe->fcp_trsp.bde.tus.f.bdeSize = rsp->rsplen;
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: lpfc: remove redundant assignment of sgel
2017-02-24 13:45 [PATCH] scsi: lpfc: remove redundant assignment of sgel Colin King
@ 2017-03-04 17:42 ` James Smart
0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2017-03-04 17:42 UTC (permalink / raw)
To: Colin King, Dick Kennedy, James E . J . Bottomley,
Martin K . Petersen, linux-scsi
Cc: kernel-janitors, linux-kernel
Looks good. I included it in the lpfc patch set just posted.
-- james
On 2/24/2017 5:45 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> In the NVMET_FCOP_RSP case, sgel is assigned but never used and
> hence is redundant and can be removed.
>
> Detected by CoverityScan, CID#1411658 ("Unused value")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/scsi/lpfc/lpfc_nvmet.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
> index c421e17..e59a0a8 100644
> --- a/drivers/scsi/lpfc/lpfc_nvmet.c
> +++ b/drivers/scsi/lpfc/lpfc_nvmet.c
> @@ -1445,7 +1445,6 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba,
>
> case NVMET_FCOP_RSP:
> /* Words 0 - 2 */
> - sgel = &rsp->sg[0];
> physaddr = rsp->rspdma;
> wqe->fcp_trsp.bde.tus.f.bdeFlags = BUFF_TYPE_BDE_64;
> wqe->fcp_trsp.bde.tus.f.bdeSize = rsp->rsplen;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-04 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-24 13:45 [PATCH] scsi: lpfc: remove redundant assignment of sgel Colin King
2017-03-04 17:42 ` James Smart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).