All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 1/2] brcmfmac: merge two brcmf_err macros into one
@ 2017-01-18 14:27 Rafał Miłecki
  2017-01-18 14:27 ` [PATCH RFC 2/2] brcmfmac: add brcmf_err_pub macro for better error messages Rafał Miłecki
  2017-01-20 10:13 ` [PATCH RFC 1/2] brcmfmac: merge two brcmf_err macros into one Arend Van Spriel
  0 siblings, 2 replies; 10+ messages in thread
From: Rafał Miłecki @ 2017-01-18 14:27 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>
---
 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, ...);
-- 
2.10.1

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

end of thread, other threads:[~2017-01-20 12:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-18 14:27 [PATCH RFC 1/2] brcmfmac: merge two brcmf_err macros into one Rafał Miłecki
2017-01-18 14:27 ` [PATCH RFC 2/2] brcmfmac: add brcmf_err_pub macro for better error messages Rafał Miłecki
2017-01-20 10:26   ` Arend Van Spriel
2017-01-20 11:17     ` Rafał Miłecki
2017-01-20 11:37       ` Arend Van Spriel
2017-01-20 12:52         ` Rafał Miłecki
2017-01-20 10:13 ` [PATCH RFC 1/2] brcmfmac: merge two brcmf_err macros into one Arend Van Spriel
2017-01-20 10:14   ` Arend Van Spriel
2017-01-20 10:58     ` Rafał Miłecki
2017-01-20 11:03       ` Arend Van Spriel

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.