From: Colin Ian King Date: Wed, 19 Oct 2022 22:57:09 +0000 (+0100) Subject: thunderbolt: Remove redundant assignment to variable len X-Git-Tag: v6.2-rc1~70^2~33^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9589c417fedab6b963cf084ef305665166f5326;p=thirdparty%2Fkernel%2Flinux.git thunderbolt: Remove redundant assignment to variable len 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 Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c index ddd8fd2d06f86..cfa83486c9dad 100644 --- a/drivers/thunderbolt/xdomain.c +++ b/drivers/thunderbolt/xdomain.c @@ -342,7 +342,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 {