Thread (2 messages) 2 messages, 2 authors, 2021-05-22

[PATCH] scsi: be2iscsi: Remove redundant initialization

From: Nigel Christian <hidden>
Date: 2021-05-13 22:20:39
Also in: linux-scsi
Subsystem: emulex 10gbps iscsi - oneconnect driver, iscsi, scsi subsystem, the rest · Maintainers: Ketan Mukadam, Lee Duncan, Chris Leech, Mike Christie, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

The nested for loop variables i and j in beiscsi_free_mem() are
initialized twice. The values outside of the loops are redundant
and can be removed. 

Addresses-Coverity: ("Unused value")
Signed-off-by: Nigel Christian <redacted>
---
 drivers/scsi/be2iscsi/be_main.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 22cf7f4b8d8c..c15cc6c164d9 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -3858,8 +3858,6 @@ static void beiscsi_free_mem(struct beiscsi_hba *phba)
 	int i, j;
 
 	mem_descr = phba->init_mem;
-	i = 0;
-	j = 0;
 	for (i = 0; i < SE_MEM_MAX; i++) {
 		for (j = mem_descr->num_elements; j > 0; j--) {
 			dma_free_coherent(&phba->pcidev->dev,
-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help