318-v4.11-0006-brcmfmac-merge-two-remaining-brcmf_err-macros.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. Now we always have __brcmf_err function we can do perfectly fine with
  9. just one macro.
  10. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  11. Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  12. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  13. ---
  14. drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 14 +++++---------
  15. 1 file changed, 5 insertions(+), 9 deletions(-)
  16. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
  17. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
  18. @@ -47,20 +47,16 @@
  19. __printf(2, 3)
  20. void __brcmf_err(const char *func, const char *fmt, ...);
  21. -#ifndef CPTCFG_BRCM_TRACING
  22. -/* Macro for error messages. net_ratelimit() is used when driver
  23. - * debugging is not selected. When debugging the driver error
  24. - * messages are as important as other tracing or even more so.
  25. +/* Macro for error messages. When debugging / tracing the driver all error
  26. + * messages are important to us.
  27. */
  28. #define brcmf_err(fmt, ...) \
  29. do { \
  30. - if (IS_ENABLED(CPTCFG_BRCMDBG) || net_ratelimit()) \
  31. + if (IS_ENABLED(CPTCFG_BRCMDBG) || \
  32. + IS_ENABLED(CPTCFG_BRCM_TRACING) || \
  33. + net_ratelimit()) \
  34. __brcmf_err(__func__, fmt, ##__VA_ARGS__); \
  35. } while (0)
  36. -#else
  37. -#define brcmf_err(fmt, ...) \
  38. - __brcmf_err(__func__, fmt, ##__VA_ARGS__)
  39. -#endif
  40. #if defined(DEBUG) || defined(CPTCFG_BRCM_TRACING)
  41. __printf(3, 4)