Skip to contentSkip to conversation

scsi: fcoe: remove redundant assignment to variable wlen

PATCH Applied Colin Ian King 2 participants 3 messages Jun 23, 2022 – Jul 7, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fcoe: remove redundant assignment to variable wlen

Variable wlen is being assigned a value that is never read, it is being re-assigned with a different value later on. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/scsi/fcoe/fcoe.c:1491:2: warning: Value stored to 'wlen' is never read [deadcode.DeadStores]

---
 drivers/scsi/fcoe/fcoe.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/fcoe/fcoe.c +0 -1
index c2a59109857a..6ec296321ffc 100644
@@ -1488,7 +1488,6 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
 
 	fh = fc_frame_header_get(fp);
 	skb = fp_skb(fp);
-	wlen = skb->len / FCOE_WORD_TO_BYTE;
 
 	if (!lport->link_up) {
 		kfree_skb(skb);
Signature · 1 line
2.35.3
#1 lore raw

Colin,

Quoted 3 lines

Variable wlen is being assigned a value that is never read, it is being re-assigned with a different value later on. The assignment is redundant and can be removed.

Applied to 5.20/scsi-staging, thanks!

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

Variable wlen is being assigned a value that is never read, it is being re-assigned with a different value later on. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/scsi/fcoe/fcoe.c:1491:2: warning: Value stored to 'wlen' is never read [deadcode.DeadStores]

[...]

Applied to 5.20/scsi-queue, thanks!

[1/1] scsi: fcoe: remove redundant assignment to variable wlen

      https://git.kernel.org/mkp/scsi/c/07f0c8aff551
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering