linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: mei: allow tracing to be disabled
@ 2021-12-05 13:16 Arnd Bergmann
  2021-12-05 18:12 ` Grumbach, Emmanuel
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-12-05 13:16 UTC (permalink / raw)
  To: Luca Coelho, Kalle Valo, David S. Miller, Jakub Kicinski,
	Emmanuel Grumbach, Ayala Beker
  Cc: Arnd Bergmann, linux-wireless, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The Makefile conditionally leaves out the trace implementation,
but it gets called unconditionally:

ERROR: modpost: "__SCT__tp_func_iwlmei_me_msg" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__tracepoint_iwlmei_me_msg" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__SCT__tp_func_iwlmei_sap_cmd" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__tracepoint_iwlmei_sap_cmd" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__SCT__tp_func_iwlmei_sap_data" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__tracepoint_iwlmei_sap_data" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!

Use the same macro incantation that is used in the main iwlwifi driver
to leave out the tracing when CONFIG_IWLWIFI_DEVICE_TRACING is disabled.

Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/intel/iwlwifi/mei/trace.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mei/trace.h b/drivers/net/wireless/intel/iwlwifi/mei/trace.h
index 6f673f2817ad..2742c90fedab 100644
--- a/drivers/net/wireless/intel/iwlwifi/mei/trace.h
+++ b/drivers/net/wireless/intel/iwlwifi/mei/trace.h
@@ -8,6 +8,17 @@
 
 #include <linux/tracepoint.h>
 
+#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
+#undef TRACE_EVENT
+#define TRACE_EVENT(name, proto, ...) \
+static inline void trace_ ## name(proto) {}
+#undef DECLARE_EVENT_CLASS
+#define DECLARE_EVENT_CLASS(...)
+#undef DEFINE_EVENT
+#define DEFINE_EVENT(evt_class, name, proto, ...) \
+static inline void trace_ ## name(proto) {}
+#endif
+
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM iwlmei_sap_cmd
 
-- 
2.29.2


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

* RE: [PATCH] iwlwifi: mei: allow tracing to be disabled
  2021-12-05 13:16 [PATCH] iwlwifi: mei: allow tracing to be disabled Arnd Bergmann
@ 2021-12-05 18:12 ` Grumbach, Emmanuel
  0 siblings, 0 replies; 2+ messages in thread
From: Grumbach, Emmanuel @ 2021-12-05 18:12 UTC (permalink / raw)
  To: Arnd Bergmann, Coelho, Luciano, Kalle Valo, David S. Miller,
	Jakub Kicinski, Beker, Ayala
  Cc: Arnd Bergmann, linux-wireless, netdev, linux-kernel

> Subject: [PATCH] iwlwifi: mei: allow tracing to be disabled
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The Makefile conditionally leaves out the trace implementation, but it gets
> called unconditionally:
> 
> ERROR: modpost: "__SCT__tp_func_iwlmei_me_msg"
> [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
> ERROR: modpost: "__tracepoint_iwlmei_me_msg"
> [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
> ERROR: modpost: "__SCT__tp_func_iwlmei_sap_cmd"
> [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
> ERROR: modpost: "__tracepoint_iwlmei_sap_cmd"
> [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
> ERROR: modpost: "__SCT__tp_func_iwlmei_sap_data"
> [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
> ERROR: modpost: "__tracepoint_iwlmei_sap_data"
> [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
> 
> Use the same macro incantation that is used in the main iwlwifi driver to
> leave out the tracing when CONFIG_IWLWIFI_DEVICE_TRACING is disabled.
> 
> Fixes: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with
> CSME")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for this, but Kalle just merged a fix I had already sent.
 

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

end of thread, other threads:[~2021-12-05 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 13:16 [PATCH] iwlwifi: mei: allow tracing to be disabled Arnd Bergmann
2021-12-05 18:12 ` Grumbach, Emmanuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).