kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req
@ 2021-09-10 11:46 Colin King
  2021-09-13 14:58 ` Himanshu Madhani
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Colin King @ 2021-09-10 11:46 UTC (permalink / raw)
  To: Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi
  Cc: kernel-janitors, linux-kernel

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

The pointer req is being initialized with a value that is never read, it
is being updated later on. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 7811c4952035..b5e21fad9551 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -3236,7 +3236,7 @@ qla24xx_abort_command(srb_t *sp)
 	fc_port_t	*fcport = sp->fcport;
 	struct scsi_qla_host *vha = fcport->vha;
 	struct qla_hw_data *ha = vha->hw;
-	struct req_que *req = vha->req;
+	struct req_que *req;
 	struct qla_qpair *qpair = sp->qpair;
 
 	ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x108c,
-- 
2.32.0


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

* Re: [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req
  2021-09-10 11:46 [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req Colin King
@ 2021-09-13 14:58 ` Himanshu Madhani
  2021-09-15  3:17 ` Martin K. Petersen
  2021-09-22  4:45 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Himanshu Madhani @ 2021-09-13 14:58 UTC (permalink / raw)
  To: Colin King
  Cc: Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin Petersen, linux-scsi,
	kernel-janitors, linux-kernel



> On Sep 10, 2021, at 6:46 AM, Colin King <colin.king@canonical.com> wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer req is being initialized with a value that is never read, it
> is being updated later on. The assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
> index 7811c4952035..b5e21fad9551 100644
> --- a/drivers/scsi/qla2xxx/qla_mbx.c
> +++ b/drivers/scsi/qla2xxx/qla_mbx.c
> @@ -3236,7 +3236,7 @@ qla24xx_abort_command(srb_t *sp)
> 	fc_port_t	*fcport = sp->fcport;
> 	struct scsi_qla_host *vha = fcport->vha;
> 	struct qla_hw_data *ha = vha->hw;
> -	struct req_que *req = vha->req;
> +	struct req_que *req;
> 	struct qla_qpair *qpair = sp->qpair;
> 
> 	ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x108c,
> -- 
> 2.32.0
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


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

* Re: [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req
  2021-09-10 11:46 [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req Colin King
  2021-09-13 14:58 ` Himanshu Madhani
@ 2021-09-15  3:17 ` Martin K. Petersen
  2021-09-22  4:45 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-09-15  3:17 UTC (permalink / raw)
  To: Colin King
  Cc: Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E . J . Bottomley, Martin K . Petersen, linux-scsi,
	kernel-janitors, linux-kernel


Colin,

> The pointer req is being initialized with a value that is never read,
> it is being updated later on. The assignment is redundant and can be
> removed.

Applied to 5.16/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req
  2021-09-10 11:46 [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req Colin King
  2021-09-13 14:58 ` Himanshu Madhani
  2021-09-15  3:17 ` Martin K. Petersen
@ 2021-09-22  4:45 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-09-22  4:45 UTC (permalink / raw)
  To: James E . J . Bottomley, linux-scsi, Colin King,
	GR-QLogic-Storage-Upstream, Nilesh Javali
  Cc: Martin K . Petersen, linux-kernel, kernel-janitors

On Fri, 10 Sep 2021 12:46:10 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer req is being initialized with a value that is never read, it
> is being updated later on. The assignment is redundant and can be removed.
> 
> 

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: qla2xxx: Remove redundant initialization of pointer req
      https://git.kernel.org/mkp/scsi/c/914418f36901

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-09-22  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 11:46 [PATCH] scsi: qla2xxx: Remove redundant initialization of pointer req Colin King
2021-09-13 14:58 ` Himanshu Madhani
2021-09-15  3:17 ` Martin K. Petersen
2021-09-22  4:45 ` 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;
as well as URLs for NNTP newsgroup(s).