mac80211: update brcmfmac backporting brcmf_err cleanups
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 319-0006-brcmfmac-merge-two-remaining-brcmf_err-macros.patch
1 From d0630555650a394cf5743268820511f527a561a5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 2 Feb 2017 22:33:15 +0100
4 Subject: [PATCH] brcmfmac: merge two remaining brcmf_err macros
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Now we always have __brcmf_err function we can do perfectly fine with
10 just one macro.
11
12 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 14 +++++---------
17 1 file changed, 5 insertions(+), 9 deletions(-)
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
21 @@ -47,20 +47,16 @@
22
23 __printf(2, 3)
24 void __brcmf_err(const char *func, const char *fmt, ...);
25 -#ifndef CPTCFG_BRCM_TRACING
26 -/* Macro for error messages. net_ratelimit() is used when driver
27 - * debugging is not selected. When debugging the driver error
28 - * messages are as important as other tracing or even more so.
29 +/* Macro for error messages. When debugging / tracing the driver all error
30 + * messages are important to us.
31 */
32 #define brcmf_err(fmt, ...) \
33 do { \
34 - if (IS_ENABLED(CPTCFG_BRCMDBG) || net_ratelimit()) \
35 + if (IS_ENABLED(CPTCFG_BRCMDBG) || \
36 + IS_ENABLED(CPTCFG_BRCM_TRACING) || \
37 + net_ratelimit()) \
38 __brcmf_err(__func__, fmt, ##__VA_ARGS__); \
39 } while (0)
40 -#else
41 -#define brcmf_err(fmt, ...) \
42 - __brcmf_err(__func__, fmt, ##__VA_ARGS__)
43 -#endif
44
45 #if defined(DEBUG) || defined(CPTCFG_BRCM_TRACING)
46 __printf(3, 4)