From patchwork Tue Apr 4 06:18:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 96688 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp48301qgd; Mon, 3 Apr 2017 23:18:28 -0700 (PDT) X-Received: by 10.98.71.24 with SMTP id u24mr20721492pfa.180.1491286707944; Mon, 03 Apr 2017 23:18:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si746909pgf.57.2017.04.03.23.18.27; Mon, 03 Apr 2017 23:18:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497AbdDDGS1 (ORCPT + 6 others); Tue, 4 Apr 2017 02:18:27 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:36109 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbdDDGS0 (ORCPT ); Tue, 4 Apr 2017 02:18:26 -0400 Received: by mail-pg0-f42.google.com with SMTP id g2so140815888pge.3 for ; Mon, 03 Apr 2017 23:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DD6O32VKunMiV1g5HyDlQRPVVld62FXY6h9wIHMkfRQ=; b=GKOiBd54uaoD0gJSEf5AzUy1UCXCkTjOZeobblcY57iw4+8ishCtydQuvsNCxLCYVN OO86IUs/yZsvzTBL4XLWHztmkqn3gVy/TOO2CMMkDeqxEMUas4tAqfEP7BvbnZIX8ENl LvzK5sTasi8gbSRePHixuU+nnUo71LFkBxaUA= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=DD6O32VKunMiV1g5HyDlQRPVVld62FXY6h9wIHMkfRQ=; b=d2he05WxKgJjGzbQ/RTOS7Za+HEYXhKMQ5yhADn45zoiTpy5RWWaq7xMBIhj0PEySQ y9jPvq9vQ1DaarRSoqLR4PE9gP+RJOSbu1QQR45ARborSiHPV/dqj1Y/FObbZp1VoRWO 5UyBGF7emRmXrQ4VuBBhU2+ONseyemzqWeOCEcxv5KWC0HUtOgxyEyojZTxDy0uP2D2I onHUNclEQNRPV4IH5nET2toJ442ePbg3LXasYoJvKzxpvopXlh4ulpFEKDWaR/kGIoIz jRcqzDyyX/JhftQ480jx2sB/vcFd5/vhrJKT+NsESNjAwaJW6bZcrNWqv1i1xNY8JTWN NDwQ== X-Gm-Message-State: AFeK/H1X6BC464jheZWO1Ygaqx1VyVdqodPRJLNk0oubg/3oaNsa/lvqvAFLkd2v2hCnlPwY X-Received: by 10.84.198.3 with SMTP id o3mr26350825pld.8.1491286705996; Mon, 03 Apr 2017 23:18:25 -0700 (PDT) Received: from localhost.localdomain ([106.51.240.246]) by smtp.gmail.com with ESMTPSA id m20sm29331500pgd.32.2017.04.03.23.18.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 23:18:25 -0700 (PDT) From: Amit Pundir To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Kalle Valo Subject: [PATCH 26/33] brcmfmac: merge two brcmf_err macros into one Date: Tue, 4 Apr 2017 11:48:05 +0530 Message-Id: <1491286688-31314-7-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491286688-31314-1-git-send-email-amit.pundir@linaro.org> References: <1491286688-31314-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rafał Miłecki This allows simplifying the code by adding a simple IS_ENABLED check for CONFIG_BRCMDB symbol. Signed-off-by: Rafał Miłecki Acked-by: Arend van Spriel Signed-off-by: Kalle Valo (cherry picked from commit 9587a01a7ead9efc5032c16e0d9668de58be1186) Signed-off-by: Amit Pundir --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h index 6687812..1fe4aa9 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h @@ -45,20 +45,16 @@ #undef pr_fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#ifndef CONFIG_BRCM_TRACING /* Macro for error messages. net_ratelimit() is used when driver * debugging is not selected. When debugging the driver error * messages are as important as other tracing or even more so. */ -#ifndef CONFIG_BRCM_TRACING -#ifdef CONFIG_BRCMDBG -#define brcmf_err(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__) -#else #define brcmf_err(fmt, ...) \ do { \ - if (net_ratelimit()) \ + if (IS_ENABLED(CONFIG_BRCMDBG) || net_ratelimit()) \ pr_err("%s: " fmt, __func__, ##__VA_ARGS__); \ } while (0) -#endif #else __printf(2, 3) void __brcmf_err(const char *func, const char *fmt, ...);