Thread (22 messages) flat view 22 messages, 3 authors, 2012-12-09

Re: [PATCH 05/11] brcmfmac: error messages should not be suppressed

From: Joe Perches <joe@perches.com>
Date: 2012-12-05 14:41:50

On Wed, 2012-12-05 at 15:25 +0100, Arend van Spriel wrote:
The call to brcmf_dbg(ERROR, ...) only resulted in a log message
when compiled with -DDEBUG. Error messages are valuable for resolving
issues so this patch replaces it with brcmf_err(...) so they always
end up in the log.
Seems like a good idea but you also
removed the net_ratelimit() which doesn't.
quoted hunk ↗ jump to hunk
@@ -33,22 +32,15 @@
 #define BRCMF_FIL_VAL	0x1000
 #define BRCMF_USB_VAL	0x2000
 
+/* error messages are always logged */
+#define brcmf_err(fmt, ...)	pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
+
 #if defined(DEBUG)
 
-#define brcmf_dbg(level, fmt, ...)					\
-do {									\
-	if (BRCMF_ERROR_VAL == BRCMF_##level##_VAL) {			\
-		if (brcmf_msg_level & BRCMF_##level##_VAL) {		\
-			if (net_ratelimit())				\
-				pr_debug("%s: " fmt,			\
-					 __func__, ##__VA_ARGS__);	\
-		}							\
-	} else {							\
-		if (brcmf_msg_level & BRCMF_##level##_VAL) {		\
-			pr_debug("%s: " fmt,				\
-				 __func__, ##__VA_ARGS__);		\
-		}							\
-	}								\
+#define brcmf_dbg(level, fmt, ...)				\
+do {								\
+	if (brcmf_msg_level & BRCMF_##level##_VAL)		\
+		pr_debug("%s: " fmt, __func__, ##__VA_ARGS__);	\
 } while (0)
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help