Skip to contentSkip to conversation

iwlegacy: 4965: remove redundant initialization of variable tid

PATCH In review Colin King 2 participants 2 messages Jul 1, 2020 – Jul 15, 2020

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 iwlegacy: 4965: remove redundant initialization of variable tid

From: Colin Ian King <[email protected]>

The variable tid is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/net/wireless/intel/iwlegacy/4965-rs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlegacy/4965-rs.c +1 -1
index 0a02d8aca320..1f196665d21f 100644
@@ -1749,7 +1749,7 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb,
 	u8 done_search = 0;
 	u16 high_low;
 	s32 sr;
-	u8 tid = MAX_TID_COUNT;
+	u8 tid;
 	struct il_tid_data *tid_data;
 
 	D_RATE("rate scale calculate new rate for skb\n");
Signature · 1 line
2.27.0
#1 lore raw

Re: [PATCH] iwlegacy: remove redundant initialization of variable tid

Quoted 8 lines · Colin King

From: Colin Ian King <[email protected]>

The variable tid is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Patch applied to wireless-drivers-next.git, thanks.

ddfa943f246a iwlegacy: remove redundant initialization of variable tid

Signature · 3 lines
https://patchwork.kernel.org/patch/11636467/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches