wireless: remove unnecessary unlikely()
Subsystems (4)
PATCH 1/1 wireless: remove unnecessary unlikely()
Both WARN_ON() and WARN_ON_ONCE() already contain unlikely().
Signed-off-by Igor Stoppa <[email protected]>
Cc Kalle Valo <[email protected]>
Cc Christian Lamparter <[email protected]>
Cc Michal Kazior <[email protected]>
Cc Larry Finger <[email protected]>
Cc Linux Kernel Mailing List <[email protected]>
Cc Linux Wireless Mailing List <[email protected]>
--- drivers/net/wireless/ath/ath10k/htt_rx.c | 4 ++-- drivers/net/wireless/ath/carl9170/tx.c | 4 ++-- drivers/net/wireless/broadcom/b43/dma.c | 2 +- drivers/net/wireless/broadcom/b43legacy/dma.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +2 -2
@@ -1176,11 +1176,11 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar,*/ /* This probably shouldn't happen but warn just in case */ -if (unlikely (WARN_ON_ONCE (!is_first))) +if (WARN_ON_ONCE (!is_first))return ;/* This probably shouldn't happen but warn just in case */ -if (unlikely (WARN_ON_ONCE (!(is_first && is_last)))) +if (WARN_ON_ONCE (!(is_first && is_last)))return ;skb_trim (msdu, msdu->len -FCS_LEN );
drivers/net/wireless/ath/carl9170/tx.c +2 -2
@@ -246,8 +246,8 @@ static void carl9170_release_dev_space(struct ar9170 *ar, struct sk_buff *skb)* of available memory blocks, so the number can * never execeed the mem_blocks count. */ -if (unlikely (WARN_ON_ONCE (cookie ==0 ) || -WARN_ON_ONCE (cookie > ar->fw.mem_blocks))) +if (WARN_ON_ONCE (cookie ==0 ) || +WARN_ON_ONCE (cookie > ar->fw.mem_blocks))return ; atomic_add(DIV_ROUND_UP(skb->len, ar->fw.mem_block_size),
drivers/net/wireless/broadcom/b43/dma.c +1 -1
@@ -1432,7 +1432,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb) goto out; } -if (unlikely (WARN_ON (free_slots (ring) <TX_SLOTS_PER_FRAME ))) { +if (WARN_ON (free_slots (ring) <TX_SLOTS_PER_FRAME )) {/* If we get here, we have a real error with the queue * full, but queues not stopped. */ b43err (dev->wl,"DMA queue overflow\n" );
drivers/net/wireless/broadcom/b43legacy/dma.c +1 -1
@@ -1149,7 +1149,7 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev,return -ENOSPC ; } -if (unlikely (WARN_ON (free_slots (ring) <SLOTS_PER_PACKET ))) { +if (WARN_ON (free_slots (ring) <SLOTS_PER_PACKET )) {/* If we get here, we have a real error with the queue * full, but queues not stopped. */ b43legacyerr (dev->wl,"DMA queue overflow\n" );
Signature · 1 line
2.17.1
Quoted 9 lines · Igor Stoppa
Both
WARN_ON()andWARN_ON_ONCE()already containunlikely().Signed-off-by Igor Stoppa <[email protected]>Cc Kalle Valo <[email protected]>Cc Christian Lamparter <[email protected]>Cc Michal Kazior <[email protected]>Cc Larry Finger <[email protected]>Cc Linux Kernel Mailing List <[email protected]>Cc Linux Wireless Mailing List <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
7e41fb504592 wireless: remove unnecessary unlikely()
Signature · 3 lines
https://patchwork.kernel.org/patch/10583997/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches