All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 1/9] brcmfmac: merge two brcmf_err macros into one
@ 2017-02-02 21:33 Rafał Miłecki
  2017-02-02 21:33 ` [PATCH V3 2/9] brcmfmac: switch to C function (__brcmf_err) for printing errors Rafał Miłecki
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Rafał Miłecki @ 2017-02-02 21:33 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman,
	Pieter-Paul Giesberts, Franky Lin, linux-wireless,
	brcm80211-dev-list.pdl, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

This allows simplifying the code by adding a simple IS_ENABLED check for
CONFIG_BRCMDB symbol.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
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, ...);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-03-21 13:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 21:33 [PATCH V3 1/9] brcmfmac: merge two brcmf_err macros into one Rafał Miłecki
2017-02-02 21:33 ` [PATCH V3 2/9] brcmfmac: switch to C function (__brcmf_err) for printing errors Rafał Miłecki
2017-02-08  9:15   ` Arend Van Spriel
2017-02-02 21:33 ` [PATCH V3 3/9] brcmfmac: merge two remaining brcmf_err macros Rafał Miłecki
2017-02-08  9:52   ` Arend Van Spriel
2017-02-02 21:33 ` [PATCH V3 4/9] brcmfmac: add struct brcmf_pub parameter to the __brcmf_err Rafał Miłecki
2017-02-08  9:54   ` Arend Van Spriel
2017-02-08 10:00     ` Rafał Miłecki
2017-02-08 14:52       ` Kalle Valo
2017-02-08 15:09         ` Rafał Miłecki
2017-02-23 21:08     ` Rafał Miłecki
2017-02-23 21:41     ` Rafał Miłecki
2017-03-21 13:49       ` Arend Van Spriel
2017-02-02 21:33 ` [PATCH V3 5/9] brcmfmac: pcie: store private pointer to struct brcmf_pub Rafał Miłecki
2017-02-05 19:49   ` Arend Van Spriel
2017-02-02 21:33 ` [PATCH V3 6/9] brcmfmac: usb: " Rafał Miłecki
2017-02-02 21:33 ` [PATCH V3 7/9] brcmfmac: sdio: " Rafał Miłecki
2017-02-02 21:33 ` [PATCH V3 8/9] brcmfmac: modify all brcmf_err calls adding " Rafał Miłecki
2017-02-02 21:33 ` [PATCH V3 9/9] brcmfmac: use dev_err to print errors Rafał Miłecki
2017-02-08  9:02 ` [PATCH V3 1/9] brcmfmac: merge two brcmf_err macros into one Arend Van Spriel
2017-02-08 15:24 ` [V3,1/9] " Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.