1
0

319-0004-brcmfmac-merge-two-brcmf_err-macros-into-one.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 9587a01a7ead9efc5032c16e0d9668de58be1186 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:13 +0100
  4. Subject: [PATCH] brcmfmac: merge two brcmf_err macros into one
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This allows simplifying the code by adding a simple IS_ENABLED check for
  9. CONFIG_BRCMDB symbol.
  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 | 8 ++------
  15. 1 file changed, 2 insertions(+), 6 deletions(-)
  16. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
  17. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
  18. @@ -45,20 +45,16 @@
  19. #undef pr_fmt
  20. #define pr_fmt(fmt) KBUILD_MODNAME ": " 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. */
  26. -#ifndef CPTCFG_BRCM_TRACING
  27. -#ifdef CPTCFG_BRCMDBG
  28. -#define brcmf_err(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
  29. -#else
  30. #define brcmf_err(fmt, ...) \
  31. do { \
  32. - if (net_ratelimit()) \
  33. + if (IS_ENABLED(CPTCFG_BRCMDBG) || net_ratelimit()) \
  34. pr_err("%s: " fmt, __func__, ##__VA_ARGS__); \
  35. } while (0)
  36. -#endif
  37. #else
  38. __printf(2, 3)
  39. void __brcmf_err(const char *func, const char *fmt, ...);