The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: remove redundant assignment to variable len
@ 2022-10-19 22:57 Colin Ian King
  2022-10-23  6:52 ` Mika Westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-19 22:57 UTC (permalink / raw)
  To: Andreas Noever, Michael Jamet, Mika Westerberg, Yehezkel Bernat,
	linux-usb
  Cc: kernel-janitors, linux-kernel

The variable len is assigned a value that is never read. It is re-assigned
a new value in the following do-while loop and never referenced after
the loop. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/thunderbolt/xdomain.c:344:2: warning: Value stored to 'len' is
never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/thunderbolt/xdomain.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index f00b2f62d8e3..5e99f93ee1a1 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -341,7 +341,6 @@ static int tb_xdp_properties_request(struct tb_ctl *ctl, u64 route,
 	memcpy(&req.src_uuid, src_uuid, sizeof(*src_uuid));
 	memcpy(&req.dst_uuid, dst_uuid, sizeof(*dst_uuid));
 
-	len = 0;
 	data_len = 0;
 
 	do {
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-23  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 22:57 [PATCH] thunderbolt: remove redundant assignment to variable len Colin Ian King
2022-10-23  6:52 ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox