From patchwork Thu Feb 2 21:33:13 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: 9553249 X-Patchwork-Delegate: kvalo@adurom.com 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 EDE3960405 for ; Thu, 2 Feb 2017 21:33:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E070E28499 for ; Thu, 2 Feb 2017 21:33:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D44A1284BC; Thu, 2 Feb 2017 21:33:39 +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 6C5A428499 for ; Thu, 2 Feb 2017 21:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbdBBVdh (ORCPT ); Thu, 2 Feb 2017 16:33:37 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34398 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbdBBVdg (ORCPT ); Thu, 2 Feb 2017 16:33:36 -0500 Received: by mail-lf0-f66.google.com with SMTP id q89so46565lfi.1 for ; Thu, 02 Feb 2017 13:33:36 -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=0a5HFfH1L63y1N7vfBRdUuN5I09DX2uSJuje+PpNbDQ=; b=vcxjkm76zf32DUhHsanUAoYbmJ5pJcQMeT5OI4ywbjM+SWYdMV2HtDGrP3W/dAhsz4 WT3wgfKL6wa6822gnkt6CGfOGW5Oh/J4+3wWji3LzcJnQQxXKRPX2VdwzwwpTRBHqYrV x5wFLchlHX7gvCk+l+sOlFA/HAzb7QdAVgnBRiZXFXYgX5rJRVomnOGwt0DnMk3wla6W o/2She9mgVYFRXQle1zasmPfrqZPEXMojCcXHrf323Fh85zq/0NA2q+QVAjWG4jc9nYI v/rC9IY6WazvuZKXUaUHF4S8sbbDJ0CWtfNQXZ1PJ0kGZBhY2+XDQjpeEkeq7HB8lGQZ mKZA== 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=0a5HFfH1L63y1N7vfBRdUuN5I09DX2uSJuje+PpNbDQ=; b=arCHkPhG98WJlTsn2MeeuNpEUIsA1Ge/ZgNIeYr68TXJ3mV/Xkf/et3Zo3E8N25Ce7 HQ2GaBwKHf14cujUFU5wENTnVjsykF2OfHXLqKdjS9mGDaasfBrr2V4+3wTEnoPK6ytU a8Bg2THav2pDJTJktg+vnCzM6/Ae2eozqXLL7C4f7b4tcLg+0dKRxJTk74EDskx41bQE xOlbd/xYcA81DQWpw9sXyODNULE3cnOb9CJL8RKuoY9OyuDsudZyk3esGQTaPGPje9Ga l3WIfTeAfRGUDeJTslOtlMM5O0avcbkuFEiUOD1wV42EI7twTP6KZz7TG8Y2+KRKCBpe J/IQ== X-Gm-Message-State: AIkVDXJQkO2S24gupnDzeyoiJrAcehBozQyRORY6e13n1zGQFYVeATjsQXb3GUNwDdjPCg== X-Received: by 10.25.17.29 with SMTP id g29mr3336922lfi.10.1486071214808; Thu, 02 Feb 2017 13:33:34 -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 1sm2590003ljv.40.2017.02.02.13.33.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Feb 2017 13:33:34 -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 V3 1/9] brcmfmac: merge two brcmf_err macros into one Date: Thu, 2 Feb 2017 22:33:13 +0100 Message-Id: <20170202213321.11591-1-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 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 --- V3: Re-add this patch (it was initially submited as RFC) --- 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 6687812770cc..1fe4aa973a92 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, ...);