Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: bnx2fc: Remove redundant assignment to variable 'i'

The variable 'i' is being assigned a value that is never read, the
following code path via the label ofld_err never refers to the
variable. The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/scsi/bnx2fc/bnx2fc_tgt.c:132:5: warning: Value stored to 'i'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240415104311.484890-1-colin.i.king@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Colin Ian King and committed by
Martin K. Petersen
cb3bfbfa 28027ec8

+1 -3
+1 -3
drivers/scsi/bnx2fc/bnx2fc_tgt.c
··· 128 128 BNX2FC_TGT_DBG(tgt, "ctx_alloc_failure, " 129 129 "retry ofld..%d\n", i++); 130 130 msleep_interruptible(1000); 131 - if (i > 3) { 132 - i = 0; 131 + if (i > 3) 133 132 goto ofld_err; 134 - } 135 133 goto retry_ofld; 136 134 } 137 135 goto ofld_err;