From patchwork Wed Jan 18 14:27:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9524011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D74B0601B7 for ; Wed, 18 Jan 2017 14:27:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA3CD28500 for ; Wed, 18 Jan 2017 14:27:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEE28285F4; Wed, 18 Jan 2017 14:27:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A59F28500 for ; Wed, 18 Jan 2017 14:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751975AbdARO1R (ORCPT ); Wed, 18 Jan 2017 09:27:17 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:34423 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894AbdARO1Q (ORCPT ); Wed, 18 Jan 2017 09:27:16 -0500 Received: by mail-lf0-f68.google.com with SMTP id q89so1991229lfi.1 for ; Wed, 18 Jan 2017 06:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ch9V0TgXLyZpUKIgyhaXfpVMCYia8agqrgJpNHOL3vI=; b=ci8bPP/bKtntAGEan/h5XlzGxxRUQKAO8jJpuj6CXGpLRwxwhWB3br10jsLGe6ydav i5iKATUX6QrHCe2ExunFVAIsatHLk1Jva+CNKWLdB3xsWQKU8sfXxN77gdeVbVTNVNdN SLopRiFg15+VyFbdXoP9rMMj7o/k87VRAY86+Dx8/5cMrQdCir0Oiu11wRpXOHNJyw3J 9pWuGGiV7zgLCzvVmCLJL6ctaXXF85SB3MKWskey9dlVSx+S5dPPYWXHbX0yznuCKkj4 U2lJ7CpFQwzqM9P41NnSDeSPrjPYvCPBsV7R1LPOHX+wSOT9mi/md9et9ZSdCg9MnPyr qI3Q== 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:mime-version :content-transfer-encoding; bh=Ch9V0TgXLyZpUKIgyhaXfpVMCYia8agqrgJpNHOL3vI=; b=MBOQmprgeUE+oEWTknkjfd40BOfkThX4vL6YFly1mGc7ANSSIy7sRArS3iGwD2JHNp ojtte6CA/iaNkT1eWgRCnJB/MFB+Y0O6ERG4MPtRXMmpDmt8QQvCuDAeLGbOW0fFr2Fc UThs3Lgv/xSQ+JtDb8W/o924VtjvYZjYBM6EKgbZBDrUXUpoo/2xYHNKyfgrYz7HK/h6 RMHxiQRO+Ypp+FpjxPvZxqodfJzX+3UsW+5MC7CKPGbTbgFyWt4DhDmu3VQhIszecUnn d6zIUKX9iOrGJ15sztzKdq+hqjmiTWASUsF9SDgDrPq96tRIs3HEF9IV8geQfjywsADi 00yw== X-Gm-Message-State: AIkVDXK2dUa44iFpVfIgGNjDvJOFYojmw8UTAagCgtTeLka/nU6O9DKAcFfA34k1ht7ylA== X-Received: by 10.25.168.196 with SMTP id r187mr1226659lfe.70.1484749635147; Wed, 18 Jan 2017 06:27:15 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id g85sm284583lji.21.2017.01.18.06.27.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2017 06:27:14 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , Franky Lin , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH RFC 1/2] brcmfmac: merge two brcmf_err macros into one Date: Wed, 18 Jan 2017 15:27:02 +0100 Message-Id: <20170118142703.9824-1-zajec5@gmail.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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, ...);