wireless: remove unnecessary unlikely()

Both WARN_ON() and WARN_ON_ONCE() already contain unlikely().

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Michal Kazior <michal.kazior@tieto.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linux Wireless Mailing List <linux-wireless@vger.kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Igor Stoppa 2018-08-31 18:03:00 +03:00 committed by Kalle Valo
parent 514502c3a7
commit 7e41fb5045
4 changed files with 6 additions and 6 deletions

View File

@ -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 */ /* This probably shouldn't happen but warn just in case */
if (unlikely(WARN_ON_ONCE(!is_first))) if (WARN_ON_ONCE(!is_first))
return; return;
/* This probably shouldn't happen but warn just in case */ /* 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; return;
skb_trim(msdu, msdu->len - FCS_LEN); skb_trim(msdu, msdu->len - FCS_LEN);

View File

@ -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 * of available memory blocks, so the number can
* never execeed the mem_blocks count. * never execeed the mem_blocks count.
*/ */
if (unlikely(WARN_ON_ONCE(cookie == 0) || if (WARN_ON_ONCE(cookie == 0) ||
WARN_ON_ONCE(cookie > ar->fw.mem_blocks))) WARN_ON_ONCE(cookie > ar->fw.mem_blocks))
return; return;
atomic_add(DIV_ROUND_UP(skb->len, ar->fw.mem_block_size), atomic_add(DIV_ROUND_UP(skb->len, ar->fw.mem_block_size),

View File

@ -1432,7 +1432,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
goto out; 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 /* If we get here, we have a real error with the queue
* full, but queues not stopped. */ * full, but queues not stopped. */
b43err(dev->wl, "DMA queue overflow\n"); b43err(dev->wl, "DMA queue overflow\n");

View File

@ -1149,7 +1149,7 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev,
return -ENOSPC; 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 /* If we get here, we have a real error with the queue
* full, but queues not stopped. */ * full, but queues not stopped. */
b43legacyerr(dev->wl, "DMA queue overflow\n"); b43legacyerr(dev->wl, "DMA queue overflow\n");