* [PATCH] scsi: fcoe: remove redundant assignment to variable wlen
@ 2022-06-23 16:47 Colin Ian King
2022-06-28 2:45 ` Martin K. Petersen
2022-07-07 21:47 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-06-23 16:47 UTC (permalink / raw)
To: Hannes Reinecke, James E . J . Bottomley, Martin K . Petersen,
linux-scsi
Cc: kernel-janitors, linux-kernel
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]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/scsi/fcoe/fcoe.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index c2a59109857a..6ec296321ffc 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -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);
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: fcoe: remove redundant assignment to variable wlen
2022-06-23 16:47 [PATCH] scsi: fcoe: remove redundant assignment to variable wlen Colin Ian King
@ 2022-06-28 2:45 ` Martin K. Petersen
2022-07-07 21:47 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-06-28 2:45 UTC (permalink / raw)
To: Colin Ian King
Cc: Hannes Reinecke, James E . J . Bottomley, Martin K . Petersen,
linux-scsi, kernel-janitors, linux-kernel
Colin,
> 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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: fcoe: remove redundant assignment to variable wlen
2022-06-23 16:47 [PATCH] scsi: fcoe: remove redundant assignment to variable wlen Colin Ian King
2022-06-28 2:45 ` Martin K. Petersen
@ 2022-07-07 21:47 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-07-07 21:47 UTC (permalink / raw)
To: Colin Ian King, linux-scsi, Hannes Reinecke, James E . J . Bottomley
Cc: Martin K . Petersen, kernel-janitors, linux-kernel
On Thu, 23 Jun 2022 17:47:10 +0100, Colin Ian King wrote:
> 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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-07 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 16:47 [PATCH] scsi: fcoe: remove redundant assignment to variable wlen Colin Ian King
2022-06-28 2:45 ` Martin K. Petersen
2022-07-07 21:47 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).