Skip to contentSkip to conversation

ath10k: htt: remove some dead code

PATCH In review Dan Carpenter 2 participants 3 messages Oct 11, 2018 – Oct 13, 2018

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

PATCH 1/1 ath10k: htt: remove some dead code

We added an unnecessary condition here in commit a904417fc876 ("ath10k:
add extended per sta tx statistics support"). "legacy_rate_idx" is a u8 so it can't be negative. The caller doesn't pass negatives either. I have deleted this code.

---
I didn't use the Fixes tag because it's not really a bug.

drivers/net/wireless/ath/ath10k/htt_rx.c +0 -2
index f2405258a6d3..13717a287848 100644
@@ -2680,8 +2680,6 @@ ath10k_accumulate_per_peer_tx_stats(struct ath10k *ar,
 		STATS_OP_FMT(RETRY).ht[1][ht_idx] += pstats->retry_pkts;
 	} else {
 		mcs = legacy_rate_idx;
-		if (mcs < 0)
-			return;
 
 		STATS_OP_FMT(SUCC).legacy[0][mcs] += pstats->succ_bytes;
 		STATS_OP_FMT(SUCC).legacy[1][mcs] += pstats->succ_pkts;
#1 lore raw
Quoted 7 lines · Dan Carpenter

We added an unnecessary condition here in commit a904417fc876 ("ath10k:
add extended per sta tx statistics support"). "legacy_rate_idx" is a u8 so it can't be negative. The caller doesn't pass negatives either. I have deleted this code.

Patch applied to ath-next branch of ath.git, thanks.

e3bfecd5cd37 ath10k: htt: remove some dead code

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
In reply to Dan Carpenter
Quoted 7 lines · Dan Carpenter

We added an unnecessary condition here in commit a904417fc876 ("ath10k:
add extended per sta tx statistics support"). "legacy_rate_idx" is a u8 so it can't be negative. The caller doesn't pass negatives either. I have deleted this code.

Patch applied to ath-next branch of ath.git, thanks.

e3bfecd5cd37 ath10k: htt: remove some dead code

Signature · 9 lines
https://patchwork.kernel.org/patch/10636255/

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


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k