All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: add wrapper function to ath11k_dbg
@ 2019-06-18 10:46 Venkateswara Naralasetty
  0 siblings, 0 replies; 4+ messages in thread
From: Venkateswara Naralasetty @ 2019-06-18 10:46 UTC (permalink / raw)
  To: ath11k; +Cc: Venkateswara Naralasetty

This patch define a macro for ath11k_dbg() which improves
the Rx performance by avoid calling ath11k_dbg() from
ath11k_dp_rx_deliver_msdu() when no dbg_mask set.

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/debug.c |  6 +++---
 drivers/net/wireless/ath/ath11k/debug.h | 18 +++++++++++-------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c
index 69a2340..6e16c29 100644
--- a/drivers/net/wireless/ath/ath11k/debug.c
+++ b/drivers/net/wireless/ath/ath11k/debug.c
@@ -53,8 +53,8 @@ void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...)
 }
 
 #ifdef CONFIG_ATH11K_DEBUG
-void ath11k_dbg(struct ath11k_base *ab, enum ath11k_debug_mask mask,
-		const char *fmt, ...)
+void __ath11k_dbg(struct ath11k_base *ab, enum ath11k_debug_mask mask,
+		  const char *fmt, ...)
 {
 	struct va_format vaf;
 	va_list args;
@@ -83,7 +83,7 @@ void ath11k_dbg_dump(struct ath11k_base *ab,
 
 	if (ath11k_debug_mask & mask) {
 		if (msg)
-			ath11k_dbg(ab, mask, "%s\n", msg);
+			__ath11k_dbg(ab, mask, "%s\n", msg);
 
 		for (ptr = buf; (ptr - buf) < len; ptr += 16) {
 			linebuflen = 0;
diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h
index 5774f53..eb2c82d 100644
--- a/drivers/net/wireless/ath/ath11k/debug.h
+++ b/drivers/net/wireless/ath/ath11k/debug.h
@@ -106,17 +106,17 @@ __printf(2, 3) void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...);
 extern unsigned int ath11k_debug_mask;
 
 #ifdef CONFIG_ATH11K_DEBUG
-__printf(3, 4) void ath11k_dbg(struct ath11k_base *ab,
-			       enum ath11k_debug_mask mask,
-			       const char *fmt, ...);
+__printf(3, 4) void __ath11k_dbg(struct ath11k_base *ab,
+				 enum ath11k_debug_mask mask,
+				 const char *fmt, ...);
 void ath11k_dbg_dump(struct ath11k_base *ab,
 		     enum ath11k_debug_mask mask,
 		     const char *msg, const char *prefix,
 		     const void *buf, size_t len);
 #else /* CONFIG_ATH11K_DEBUG */
-static inline int ath11k_dbg(struct ath11k_base *ab,
-			     enum ath11k_debug_mask dbg_mask,
-			     const char *fmt, ...)
+static inline int __ath11k_dbg(struct ath11k_base *ab,
+			       enum ath11k_debug_mask dbg_mask,
+			       const char *fmt, ...)
 {
 	return 0;
 }
@@ -271,5 +271,9 @@ static inline void ath11k_sta_update_rx_duration(struct ath11k *ar,
 }
 
 #endif /* CONFIG_MAC80211_DEBUGFS*/
-
+#define ath11k_dbg(ar, dbg_mask, fmt, ...)			\
+do {								\
+	if (ath11k_debug_mask & dbg_mask)			\
+		__ath11k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__);	\
+} while (0)
 #endif /* _ATH11K_DEBUG_H_ */
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ath11k: add wrapper function to ath11k_dbg
@ 2019-06-18 10:52 Venkateswara Naralasetty
  2019-06-18 12:51 ` Kalle Valo
  2019-06-20 13:40 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Venkateswara Naralasetty @ 2019-06-18 10:52 UTC (permalink / raw)
  To: ath11k; +Cc: Venkateswara Naralasetty

This patch define a macro for ath11k_dbg() which improves
the Rx performance by avoid calling ath11k_dbg() from
ath11k_dp_rx_deliver_msdu() when no dbg_mask set.

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
v2:
 * corrected one style issue

 drivers/net/wireless/ath/ath11k/debug.c |  6 +++---
 drivers/net/wireless/ath/ath11k/debug.h | 18 ++++++++++++------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c
index 69a2340..6e16c29 100644
--- a/drivers/net/wireless/ath/ath11k/debug.c
+++ b/drivers/net/wireless/ath/ath11k/debug.c
@@ -53,8 +53,8 @@ void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...)
 }
 
 #ifdef CONFIG_ATH11K_DEBUG
-void ath11k_dbg(struct ath11k_base *ab, enum ath11k_debug_mask mask,
-		const char *fmt, ...)
+void __ath11k_dbg(struct ath11k_base *ab, enum ath11k_debug_mask mask,
+		  const char *fmt, ...)
 {
 	struct va_format vaf;
 	va_list args;
@@ -83,7 +83,7 @@ void ath11k_dbg_dump(struct ath11k_base *ab,
 
 	if (ath11k_debug_mask & mask) {
 		if (msg)
-			ath11k_dbg(ab, mask, "%s\n", msg);
+			__ath11k_dbg(ab, mask, "%s\n", msg);
 
 		for (ptr = buf; (ptr - buf) < len; ptr += 16) {
 			linebuflen = 0;
diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h
index 5774f53..ebc807e 100644
--- a/drivers/net/wireless/ath/ath11k/debug.h
+++ b/drivers/net/wireless/ath/ath11k/debug.h
@@ -106,17 +106,17 @@ __printf(2, 3) void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...);
 extern unsigned int ath11k_debug_mask;
 
 #ifdef CONFIG_ATH11K_DEBUG
-__printf(3, 4) void ath11k_dbg(struct ath11k_base *ab,
-			       enum ath11k_debug_mask mask,
-			       const char *fmt, ...);
+__printf(3, 4) void __ath11k_dbg(struct ath11k_base *ab,
+				 enum ath11k_debug_mask mask,
+				 const char *fmt, ...);
 void ath11k_dbg_dump(struct ath11k_base *ab,
 		     enum ath11k_debug_mask mask,
 		     const char *msg, const char *prefix,
 		     const void *buf, size_t len);
 #else /* CONFIG_ATH11K_DEBUG */
-static inline int ath11k_dbg(struct ath11k_base *ab,
-			     enum ath11k_debug_mask dbg_mask,
-			     const char *fmt, ...)
+static inline int __ath11k_dbg(struct ath11k_base *ab,
+			       enum ath11k_debug_mask dbg_mask,
+			       const char *fmt, ...)
 {
 	return 0;
 }
@@ -272,4 +272,10 @@ static inline void ath11k_sta_update_rx_duration(struct ath11k *ar,
 
 #endif /* CONFIG_MAC80211_DEBUGFS*/
 
+#define ath11k_dbg(ar, dbg_mask, fmt, ...)			\
+do {								\
+	if (ath11k_debug_mask & dbg_mask)			\
+		__ath11k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__);	\
+} while (0)
+
 #endif /* _ATH11K_DEBUG_H_ */
-- 
2.7.4


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath11k: add wrapper function to ath11k_dbg
  2019-06-18 10:52 [PATCH] ath11k: add wrapper function to ath11k_dbg Venkateswara Naralasetty
@ 2019-06-18 12:51 ` Kalle Valo
  2019-06-20 13:40 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-06-18 12:51 UTC (permalink / raw)
  To: Venkateswara Naralasetty; +Cc: ath11k

Venkateswara Naralasetty <vnaralas@codeaurora.org> writes:

> This patch define a macro for ath11k_dbg() which improves
> the Rx performance by avoid calling ath11k_dbg() from
> ath11k_dp_rx_deliver_msdu() when no dbg_mask set.
>
> Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
> ---
> v2:
>  * corrected one style issue

When you submit v2 please remember to mark it as "[PATCH v2]" in the
Subject as well. But no need to resend because of this.

-- 
Kalle Valo

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath11k: add wrapper function to ath11k_dbg
  2019-06-18 10:52 [PATCH] ath11k: add wrapper function to ath11k_dbg Venkateswara Naralasetty
  2019-06-18 12:51 ` Kalle Valo
@ 2019-06-20 13:40 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-06-20 13:40 UTC (permalink / raw)
  To: Venkateswara Naralasetty; +Cc: ath11k

Venkateswara Naralasetty <vnaralas@codeaurora.org> wrote:

> This patch define a macro for ath11k_dbg() which improves
> the Rx performance by avoid calling ath11k_dbg() from
> ath11k_dp_rx_deliver_msdu() when no dbg_mask set.
> 
> Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath11k-bringup branch of ath.git, thanks.

6b4ad0ceb075 ath11k: add wrapper function to ath11k_dbg

-- 
https://patchwork.kernel.org/patch/11001381/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-20 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 10:52 [PATCH] ath11k: add wrapper function to ath11k_dbg Venkateswara Naralasetty
2019-06-18 12:51 ` Kalle Valo
2019-06-20 13:40 ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2019-06-18 10:46 Venkateswara Naralasetty

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.