Skip to contentSkip to conversation

iwlwifi: mei: allow tracing to be disabled

PATCH In review Arnd Bergmann 2 participants 2 messages Dec 5, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: mei: allow tracing to be disabled

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/net/wireless/intel/iwlwifi/mei/trace.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/net/wireless/intel/iwlwifi/mei/trace.h +11 -0
index 6f673f2817ad..2742c90fedab 100644
@@ -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
 
Signature · 1 line
2.29.2
#1 lore raw
Quoted 20 lines

Subject: [PATCH] iwlwifi: mei: allow tracing to be disabled

From: Arnd Bergmann <[email protected]>

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!

Quoted 6 lines

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")

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