I forgot to add stubs in case tracing is disabled. Reported-by: Jiri Slaby <jirislaby@xxxxxxxxxx> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx> --- .../net/wireless/intel/iwlwifi/mei/trace-data.h | 13 +++++++++++++ drivers/net/wireless/intel/iwlwifi/mei/trace.h | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mei/trace-data.h b/drivers/net/wireless/intel/iwlwifi/mei/trace-data.h index 0a0078a79c7e..83639c6225ca 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/trace-data.h +++ b/drivers/net/wireless/intel/iwlwifi/mei/trace-data.h @@ -3,6 +3,12 @@ * Copyright(c) 2021 Intel Corporation */ +#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) + +#define trace_iwlmei_sap_data(...) + +#else + #if !defined(__IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA) || defined(TRACE_HEADER_MULTI_READ) #ifndef __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA @@ -60,6 +66,11 @@ TRACE_EVENT(iwlmei_sap_data, __entry->trace_type, __get_dynamic_array_len(data)) ); +/* + * If you add something here, add a stub in case + * !defined(CONFIG_IWLWIFI_DEVICE_TRACING) + */ + #endif /* __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA */ #undef TRACE_INCLUDE_PATH @@ -67,3 +78,5 @@ TRACE_EVENT(iwlmei_sap_data, #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE trace-data #include <trace/define_trace.h> + +#endif /* CONFIG_IWLWIFI_DEVICE_TRACING */ diff --git a/drivers/net/wireless/intel/iwlwifi/mei/trace.h b/drivers/net/wireless/intel/iwlwifi/mei/trace.h index 6f673f2817ad..45ecb22ec84a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/trace.h +++ b/drivers/net/wireless/intel/iwlwifi/mei/trace.h @@ -3,6 +3,13 @@ * Copyright(c) 2021 Intel Corporation */ +#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) + +#define trace_iwlmei_sap_cmd(...) +#define trace_iwlmei_me_msg(...) + +#else + #if !defined(__IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD) || defined(TRACE_HEADER_MULTI_READ) #define __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD @@ -53,6 +60,11 @@ TRACE_EVENT(iwlmei_me_msg, __entry->type, __entry->seq_num) ); +/* + * If you add something here, add a stub in case + * !defined(CONFIG_IWLWIFI_DEVICE_TRACING) + */ + #endif /* __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD */ #undef TRACE_INCLUDE_PATH @@ -60,3 +72,5 @@ TRACE_EVENT(iwlmei_me_msg, #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE trace #include <trace/define_trace.h> + +#endif /* CONFIG_IWLWIFI_DEVICE_TRACING */ -- 2.25.1