] scsi: qla2xxx: Remove redundant initialization of variable num_cnt
Subsystems (3)
PATCH 1/1 ] scsi: qla2xxx: Remove redundant initialization of variable num_cnt
From: Colin Ian King <[email protected]>
The variable num_cnt 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_edif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_edif.c +1 -1
@@ -875,7 +875,7 @@ static int qla_edif_app_getfcinfo(scsi_qla_host_t *vha, struct bsg_job *bsg_job) {int32_t rval =0 ; -int32_t num_cnt =1 ; +int32_t num_cnt;struct fc_bsg_reply *bsg_reply = bsg_job->reply;struct app_pinfo_req app_req;struct app_pinfo_reply *app_reply;
Signature · 1 line
2.31.1
Quoted 18 lines · Colin King
From: Colin Ian King <[email protected]>
The variable
num_cntis 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 <[email protected]>--- drivers/scsi/qla2xxx/qla_edif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_edif.c +0
-0
drivers/scsi/qla2xxx/qla_edif.c static int · line 881
Quoted 8 lines
drivers/scsi/qla2xxx/qla_edif.c +1
-1@@ -875,7 +875,7 @@ static int qla_edif_app_getfcinfo(scsi_qla_host_t *vha, struct bsg_job *bsg_job) {int32_t rval =0 ; -int32_t num_cnt =1 ; +int32_t num_cnt;struct fc_bsg_reply *bsg_reply = bsg_job->reply;struct app_pinfo_req app_req;struct app_pinfo_reply *app_reply;
Looks Good.
(I am curious if that extra "next" in patch subject was a typo or some workflow added that)
Signature · 1 line
Himanshu Madhani Oracle Linux Engineering
Quoted 33 lines · Himanshu Madhani
Quoted 19 lines · Colin King
From: Colin Ian King <[email protected]>
The variable
num_cntis 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 <[email protected]>---
drivers/scsi/qla2xxx/qla_edif.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_edif.c +0
-0drivers/scsi/qla2xxx/qla_edif.c static int · line 881
Quoted 8 lines
drivers/scsi/qla2xxx/qla_edif.c +1
-1@@ -875,7 +875,7 @@ static int qla_edif_app_getfcinfo(scsi_qla_host_t *vha, struct bsg_job *bsg_job) { int32_t rval = 0; - int32_t num_cnt = 1; + int32_t num_cnt; struct fc_bsg_reply *bsg_reply = bsg_job->reply; struct app_pinfo_req app_req; struct app_pinfo_reply *app_reply;Looks Good.
Quoted 2 lines
(I am curious if that extra "next" in patch subject was a typo or some workflow added that)
It was an accidental double paste. My bad.
Quoted 3 lines
Reviewed-by Himanshu Madhani <[email protected]>
Martin K. Petersen
AppliedColin,
Quoted 3 lines
The variable
num_cntis 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.15/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
The variable
num_cntis 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.15/scsi-queue, thanks!
[1/1] scsi: qla2xxx: Remove redundant initialization of variable num_cnt
https://git.kernel.org/mkp/scsi/c/77d0f07abada
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering