Re: [PATCH V2 05/11] brcmfmac: error messages should not be suppressed
From: Joe Perches <joe@perches.com>
Date: 2012-12-06 06:33:19
On Wed, 2012-12-05 at 22:28 +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.
[]
Reviewed-by: Joe Perches <joe@perches.com>
Don't add signatures unless the person actually gives one. I didn't. []
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
[]
quoted hunk ↗ jump to hunk
@@ -35,20 +34,11 @@ #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_err(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
You still lost the net_ratelimit() for the DEBUG case. This brcmf_err macro should probably be in dhd.h, not in a debug header and not guarded by DEBUG at all.