From: Dan Carpenter Date: Thu, 11 Oct 2018 08:09:20 +0000 (+0300) Subject: ath10k: htt: remove some dead code X-Git-Tag: v4.20-rc1~27^2~83^2^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3bfecd5cd37a93c47c146c41d5f1fde7405b592;p=thirdparty%2Fkernel%2Flinux.git 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. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index edd0e74b2732b..ffec98f7be505 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -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;