Skip to content

Commit 99cfb21

Browse files
ColinIanKingmartinkpetersen
authored andcommitted
scsi: target: iscsi: Remove unused variable xfer_len
The variable 'xfer_len' is being initialized and incremented but it is never actually referenced in any other way. The variable is redundant and can be removed. Cleans up clang scan build warning: drivers/target/iscsi/iscsi_target_erl1.c:586:45: warning: variable 'xfer_len' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 767712f commit 99cfb21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/target/iscsi/iscsi_target_erl1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ int iscsit_dataout_datapduinorder_no_fbit(
583583
struct iscsi_pdu *pdu)
584584
{
585585
int i, send_recovery_r2t = 0, recovery = 0;
586-
u32 length = 0, offset = 0, pdu_count = 0, xfer_len = 0;
586+
u32 length = 0, offset = 0, pdu_count = 0;
587587
struct iscsit_conn *conn = cmd->conn;
588588
struct iscsi_pdu *first_pdu = NULL;
589589

@@ -596,7 +596,6 @@ int iscsit_dataout_datapduinorder_no_fbit(
596596
if (cmd->pdu_list[i].seq_no == pdu->seq_no) {
597597
if (!first_pdu)
598598
first_pdu = &cmd->pdu_list[i];
599-
xfer_len += cmd->pdu_list[i].length;
600599
pdu_count++;
601600
} else if (pdu_count)
602601
break;

0 commit comments

Comments
 (0)