Skip to contentSkip to conversation

mt76: Remove redundant assignment to variable tidno

PATCH In review Colin Ian King 3 participants 5 messages Feb 7, 2024

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

PATCH 1/1 mt76: Remove redundant assignment to variable tidno

The variable tidno is being assigned a value that is not being read and is being re-assigned a new value a few statements later. The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/net/wireless/mediatek/mt76/agg-rx.c:125:5: warning: Value stored to 'tidno' during its initialization is never read [deadcode.DeadStores]

---
 drivers/net/wireless/mediatek/mt76/agg-rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/agg-rx.c +1 -1
index 10cbd9e560e7..07c386c7b4d0 100644
@@ -122,7 +122,7 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
 	struct ieee80211_bar *bar = mt76_skb_get_hdr(skb);
 	struct mt76_wcid *wcid = status->wcid;
 	struct mt76_rx_tid *tid;
-	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
+	u8 tidno;
 	u16 seqno;
 
 	if (!ieee80211_is_ctl(bar->frame_control))
Signature · 1 line
2.39.2
#1 lore raw
Quoted 9 lines · Colin Ian King

The variable tidno is being assigned a value that is not being read and is being re-assigned a new value a few statements later. The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/net/wireless/mediatek/mt76/agg-rx.c:125:5: warning: Value stored to 'tidno' during its initialization is never read [deadcode.DeadStores]

"wifi:" missing from title.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
Quoted 6 lines · Kalle Valo
Quoted 4 lines · Colin Ian King

The variable tidno is being assigned a value that is not being read and is being re-assigned a new value a few statements later. The assignment is redundant and can be removed.

Quoted 8 lines
Quoted 5 lines

Cleans up clang scan warning:
drivers/net/wireless/mediatek/mt76/agg-rx.c:125:5: warning: Value stored to 'tidno' during its initialization is never read [deadcode.DeadStores]

"wifi:" missing from title.

does this require a V2?

#3 lore raw
Quoted 7 lines · Colin King (gmail)
Quoted 6 lines · Kalle Valo
Quoted 4 lines · Colin Ian King

The variable tidno is being assigned a value that is not being read and is being re-assigned a new value a few statements later. The assignment is redundant and can be removed.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

Cleans up clang scan warning:
drivers/net/wireless/mediatek/mt76/agg-rx.c:125:5: warning: Value stored to 'tidno' during its initialization is never read [deadcode.DeadStores]

"wifi:" missing from title.

does this require a V2?

Up to Felix, my guess is that he can add it during commit.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
maintainer Reviewed-by on v1 1/1
#4 lore raw
In reply to Colin Ian King

Il 07/02/24 14:11, Colin Ian King ha scritto:

Quoted 9 lines

The variable tidno is being assigned a value that is not being read and is being re-assigned a new value a few statements later. The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/net/wireless/mediatek/mt76/agg-rx.c:125:5: warning: Value stored to 'tidno' during its initialization is never read [deadcode.DeadStores]

Quoted 17 lines
---
  drivers/net/wireless/mediatek/mt76/agg-rx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/agg-rx.c +1 -1
index 10cbd9e560e7..07c386c7b4d0 100644
@@ -122,7 +122,7 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
  	struct ieee80211_bar *bar = mt76_skb_get_hdr(skb);
  	struct mt76_wcid *wcid = status->wcid;
  	struct mt76_rx_tid *tid;
-	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
+	u8 tidno;
  	u16 seqno;
 
  	if (!ieee80211_is_ctl(bar->frame_control))