Skip to contentSkip to conversation

scsi: qla2xxx: Remove redundant initialization of pointer req

PATCH Applied Colin King 3 participants 4 messages Sep 10, 2021 – Sep 22, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 scsi: qla2xxx: Remove redundant initialization of pointer req

From: Colin Ian King <[email protected]>

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")

---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
index 7811c4952035..b5e21fad9551 100644
@@ -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,
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Colin King

From: Colin Ian King <[email protected]>

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")

---
drivers/scsi/qla2xxx/qla_mbx.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
index 7811c4952035..b5e21fad9551 100644
@@ -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,
Signature · 1 line
2.32.0

--
Himanshu Madhani Oracle Linux Engineering

#2 lore raw
In reply to Colin King

Colin,

Quoted 3 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
In reply to Colin King
Quoted 6 lines · Colin King

From: Colin Ian King <[email protected]>

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
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering