Commit fe6db7ed authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Kalle Valo

iwlwifi: mei: fix linking when tracing is not enabled

I forgot to add stubs in case tracing is disabled which caused linking errors:

ERROR: modpost: "__SCT__tp_func_iwlmei_sap_data" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__SCT__tp_func_iwlmei_me_msg" [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: "__tracepoint_iwlmei_me_msg" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__SCK__tp_func_iwlmei_me_msg" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__SCK__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!
ERROR: modpost: "__SCT__tp_func_iwlmei_sap_cmd" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!
ERROR: modpost: "__SCK__tp_func_iwlmei_sap_cmd" [drivers/net/wireless/intel/iwlwifi/mei/iwlmei.ko] undefined!

Fixes: 2da4366f ("iwlwifi: mei: add the driver to allow cooperation with CSME")
Reported-by: default avatarJiri Slaby <jirislaby@kernel.org>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Acked-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211201113411.130409-1-emmanuel.grumbach@intel.com
parent 69831173
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
* Copyright(c) 2021 Intel Corporation * 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) #if !defined(__IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA) || defined(TRACE_HEADER_MULTI_READ)
#ifndef __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA #ifndef __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA
...@@ -60,6 +66,11 @@ TRACE_EVENT(iwlmei_sap_data, ...@@ -60,6 +66,11 @@ TRACE_EVENT(iwlmei_sap_data,
__entry->trace_type, __get_dynamic_array_len(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 */ #endif /* __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_DATA */
#undef TRACE_INCLUDE_PATH #undef TRACE_INCLUDE_PATH
...@@ -67,3 +78,5 @@ TRACE_EVENT(iwlmei_sap_data, ...@@ -67,3 +78,5 @@ TRACE_EVENT(iwlmei_sap_data,
#undef TRACE_INCLUDE_FILE #undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace-data #define TRACE_INCLUDE_FILE trace-data
#include <trace/define_trace.h> #include <trace/define_trace.h>
#endif /* CONFIG_IWLWIFI_DEVICE_TRACING */
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
* Copyright(c) 2021 Intel Corporation * 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) #if !defined(__IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD) || defined(TRACE_HEADER_MULTI_READ)
#define __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD #define __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD
...@@ -53,6 +60,11 @@ TRACE_EVENT(iwlmei_me_msg, ...@@ -53,6 +60,11 @@ TRACE_EVENT(iwlmei_me_msg,
__entry->type, __entry->seq_num) __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 */ #endif /* __IWLWIFI_DEVICE_TRACE_IWLWIFI_SAP_CMD */
#undef TRACE_INCLUDE_PATH #undef TRACE_INCLUDE_PATH
...@@ -60,3 +72,5 @@ TRACE_EVENT(iwlmei_me_msg, ...@@ -60,3 +72,5 @@ TRACE_EVENT(iwlmei_me_msg,
#undef TRACE_INCLUDE_FILE #undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace #define TRACE_INCLUDE_FILE trace
#include <trace/define_trace.h> #include <trace/define_trace.h>
#endif /* CONFIG_IWLWIFI_DEVICE_TRACING */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment