Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp589906imm; Fri, 31 Aug 2018 08:09:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJUJLxHqOv4zlys9GiUdkVKprMqtx9Bn+NxZL+lTo1EQtE/s/vX1r/J5PT2P3lDEKcKews X-Received: by 2002:aa7:831b:: with SMTP id t27-v6mr16313084pfm.81.1535728147694; Fri, 31 Aug 2018 08:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535728147; cv=none; d=google.com; s=arc-20160816; b=OKO4nRWD79Urtlu6E7XbIxG4rtnTZMgH30lGcsJAaYVsyIDATxn1N+56QINnwtwCYz 0HI5f0ttgiQl3MByKJXsJx6exWpP1m9kNjD0fvhs2Q5cm51wdy5xVSpbrb8mtGP8hwvB SmPtLptQP7Se5d9XXmleWLS4hsuSyauCZy4eVLA3sytJfuXMbKL9CpbvDEqi922uXl6b nUTrnenKi1Dc2M92kc+hrABs4qROHdlmwXY7NJqdy1vgY8NMPFjxWtU58SmNvhe9CXZs xozH5t+skKhs7geAU6wuG6XD59LFiAKhiXX5/JygNPgCz7kYc3ODW63DW33rudY0XyLz z65A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=E69oyJ5kxilsnkzG5PpQ1Q9o/UeB3+CE8n3MRUqdzy4=; b=PoqKGE31crZNB6reEYfYxOxHDezMUL48HPqFzE9zreIvNSoTKwL5ELsAqN+axExn2S rKMQ3abDKv8kf6PNLVfnmNHSe07/BI6gbhJP7kV1FdcWpDP6bqcxSOwHkfiQEDm/nm2c AqBecbVvTjQx/BaONu1aqhKClhhMrStWDbVvDbfNsRv2l9f/PqxBSwFY7l9HYeIc/SPl 4aHX1tqq6gChU4SV+7PtP8kdpRnWqX8osFQ12TAJKisLbh8mZCkWF5NS8BG4UoZF4Cs6 pIMH4uTGoFVST56SAmV/yMK0Ml0fmSZROkxX7Iia738cYNjPfZslYbUGtAVTuRG8KVfo xKig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nmx6r78e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2-v6si9678886pgg.422.2018.08.31.08.08.53; Fri, 31 Aug 2018 08:09:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nmx6r78e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729025AbeHaTL0 (ORCPT + 99 others); Fri, 31 Aug 2018 15:11:26 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:43950 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727614AbeHaTL0 (ORCPT ); Fri, 31 Aug 2018 15:11:26 -0400 Received: by mail-lj1-f194.google.com with SMTP id m84-v6so10321424lje.10; Fri, 31 Aug 2018 08:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=E69oyJ5kxilsnkzG5PpQ1Q9o/UeB3+CE8n3MRUqdzy4=; b=Nmx6r78e6InxzD5KRQBg5zYn3rgSfLaT5Yjgkex8Xn74SxiIMnGRxOyFUWutUzMRx8 JrTdDHV3faehLxlE8DPggWbQzKcg8Nt81sldjCg61DMaciC4+pDA0SmYsoO5bSCAiaGx 1fVsUSbJPYOZJxyFx78uY6Vww8Pmuy84ZSzI/+0wzDvz5sFNtNVB7T80Wt3YH0HVE/8Z swr+mJozFcNFq6Nu/61Iiy7haCAyHUuvX3TtsWqMVacup8gq1r599S9dGKEw1cp+doJT WhYQqNf8rrbnmWYo+I+U6owCCTbPmb8PEnMHxnBxO898Ulpcz32k+VD6ZvoqJ60t3mjf F0hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E69oyJ5kxilsnkzG5PpQ1Q9o/UeB3+CE8n3MRUqdzy4=; b=KZ2NFwZ8gNRdv7vweA6pSs3Jkbg8rjb2bvwSjxLZdTndgK1D7EkR1mGmLzZPU5Wvda xSo9cURrKE2qmw++wVTltT/6gMx8vHTqIjyQA5UAZUTiM7LVvBFLlkhxy98hdzrPJSGp gIliCbCLgIvKythKROpawscpMqmN/RURR3X12GS1PoXa8q40tYPc5ueeR5iGEQBN2ezO yZZ+uPR1tIeu529a/8RH0XBQSlUUPsRJdwYTS/Nm9nXFLRLoEnpO1Gs3rNoLf7IsOtvM sfsPLyhBLZD8vsJP0at+cgZDfVCL4NdBkEB7GSKMS0grz+03TNdnYl3UP+9kqd3862ej PSZw== X-Gm-Message-State: APzg51AoZIyBp+wxmfFJvySJncnqfq6vULZsmzkDJvGi4GcxHN1NL15a 6iwLLRn63sMjFK+miXRuhqY= X-Received: by 2002:a2e:59d1:: with SMTP id g78-v6mr11124183ljf.79.1535727810557; Fri, 31 Aug 2018 08:03:30 -0700 (PDT) Received: from Mort.jumbo.freeair (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id l16-v6sm1898583lfc.32.2018.08.31.08.03.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 08:03:29 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: Kalle Valo Cc: igor.stoppa@gmail.com, Igor Stoppa , Christian Lamparter , Michal Kazior , Larry Finger , Linux Kernel Mailing List , Linux Wireless Mailing List Subject: [PATCH] wireless: remove unnecessary unlikely() Date: Fri, 31 Aug 2018 18:03:00 +0300 Message-Id: <20180831150300.2702-1-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Both WARN_ON() and WARN_ON_ONCE() already contain unlikely(). Signed-off-by: Igor Stoppa Cc: Kalle Valo Cc: Christian Lamparter Cc: Michal Kazior Cc: Larry Finger Cc: Linux Kernel Mailing List Cc: Linux Wireless Mailing List --- 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(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 4d1cd90d6d27..1455007f3eb8 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -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); diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index 0cb5b58925dc..8c75651ede6c 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c @@ -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), diff --git a/drivers/net/wireless/broadcom/b43/dma.c b/drivers/net/wireless/broadcom/b43/dma.c index 6b0e1ec346cb..d113bd997f4b 100644 --- a/drivers/net/wireless/broadcom/b43/dma.c +++ b/drivers/net/wireless/broadcom/b43/dma.c @@ -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"); diff --git a/drivers/net/wireless/broadcom/b43legacy/dma.c b/drivers/net/wireless/broadcom/b43legacy/dma.c index 2f0c64cef65f..1b1da7d83652 100644 --- a/drivers/net/wireless/broadcom/b43legacy/dma.c +++ b/drivers/net/wireless/broadcom/b43legacy/dma.c @@ -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"); -- 2.17.1