]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
wireless: remove unnecessary unlikely()
authorIgor Stoppa <igor.stoppa@gmail.com>
Fri, 31 Aug 2018 15:03:00 +0000 (18:03 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 4 Sep 2018 08:16:33 +0000 (11:16 +0300)
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>
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/carl9170/tx.c
drivers/net/wireless/broadcom/b43/dma.c
drivers/net/wireless/broadcom/b43legacy/dma.c

index 4d1cd90d6d27c3d299095626efd80888eb9e840c..1455007f3eb849cf3c75f2216acc7b3b8d9c8578 100644 (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 */
-       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);
index 0cb5b58925dc4d55026580b560f4824486fc19df..8c75651ede6c3b5727ec01b9c50fad5077d567b5 100644 (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
         *    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),
index 6b0e1ec346cb60aacd8076600033cf9ee554c462..d113bd997f4b98906ce2200ff85997b4b20b62a3 100644 (file)
@@ -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");
index 2f0c64cef65f36d2da7cd93bb17f709faeb44320..1b1da7d83652ec14a2e4c58dce1fd9f5dff8d324 100644 (file)
@@ -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");