2021-12-01 11:34:34

by Grumbach, Emmanuel

[permalink] [raw]
Subject: [PATCH] iwlwifi: mei: fix linking when tracing is not enabled

I forgot to add stubs in case tracing is disabled.

Reported-by: Jiri Slaby <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
---
.../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



2021-12-01 12:21:48

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: mei: fix linking when tracing is not enabled

Emmanuel Grumbach <[email protected]> writes:

> I forgot to add stubs in case tracing is disabled.
>
> Reported-by: Jiri Slaby <[email protected]>
> Signed-off-by: Emmanuel Grumbach <[email protected]>

Fixes tag? I can add that.

Luca, as this fixes a build problem I think I should take this directly
to wireless-drivers-next. Ack?

--
https://patchwork.kernel.org/project/linux-wireless/list/

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

2021-12-01 12:23:53

by Grumbach, Emmanuel

[permalink] [raw]
Subject: RE: [PATCH] iwlwifi: mei: fix linking when tracing is not enabled

>
> Emmanuel Grumbach <[email protected]> writes:
>
> > I forgot to add stubs in case tracing is disabled.
> >
> > Reported-by: Jiri Slaby <[email protected]>
> > Signed-off-by: Emmanuel Grumbach <[email protected]>
>
> Fixes tag? I can add that.

I skipped that because it's not merged in Linus's tree yet, so, no stable consideration.
I didn't know we need a Fixes tag for patches that are just in next as well.

>
> Luca, as this fixes a build problem I think I should take this directly to
> wireless-drivers-next. Ack?
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingp
> atches

2021-12-01 12:24:27

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: mei: fix linking when tracing is not enabled

On Wed, 2021-12-01 at 14:21 +0200, Kalle Valo wrote:
> Emmanuel Grumbach <[email protected]> writes:
>
> > I forgot to add stubs in case tracing is disabled.
> >
> > Reported-by: Jiri Slaby <[email protected]>
> > Signed-off-by: Emmanuel Grumbach <[email protected]>
>
> Fixes tag? I can add that.
>
> Luca, as this fixes a build problem I think I should take this directly
> to wireless-drivers-next. Ack?

Sure!

Acked-by: Luca Coelho <[email protected]>

--
Cheers,
Luca.

2021-12-01 12:28:18

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: mei: fix linking when tracing is not enabled

"Grumbach, Emmanuel" <[email protected]> writes:

>>
>> Emmanuel Grumbach <[email protected]> writes:
>>
>> > I forgot to add stubs in case tracing is disabled.
>> >
>> > Reported-by: Jiri Slaby <[email protected]>
>> > Signed-off-by: Emmanuel Grumbach <[email protected]>
>>
>> Fixes tag? I can add that.
>
> I skipped that because it's not merged in Linus's tree yet, so, no
> stable consideration.
> I didn't know we need a Fixes tag for patches that are just in next as well.

I don't rebase my trees and neither does Dave&Jakub, so the commit ids
won't change. What commit id should I use? I can then add the fixes tag.

--
https://patchwork.kernel.org/project/linux-wireless/list/

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

2021-12-01 12:32:05

by Grumbach, Emmanuel

[permalink] [raw]
Subject: RE: [PATCH] iwlwifi: mei: fix linking when tracing is not enabled

>
> >>
> >> Emmanuel Grumbach <[email protected]> writes:
> >>
> >> > I forgot to add stubs in case tracing is disabled.
> >> >
> >> > Reported-by: Jiri Slaby <[email protected]>
> >> > Signed-off-by: Emmanuel Grumbach
> <[email protected]>
> >>
> >> Fixes tag? I can add that.
> >
> > I skipped that because it's not merged in Linus's tree yet, so, no
> > stable consideration.
> > I didn't know we need a Fixes tag for patches that are just in next as well.
>
> I don't rebase my trees and neither does Dave&Jakub, so the commit ids
> won't change. What commit id should I use? I can then add the fixes tag.

2da4366f9e2c44afedec4acad65a99a3c7da1a35


2021-12-05 11:55:54

by Kalle Valo

[permalink] [raw]
Subject: Re: iwlwifi: mei: fix linking when tracing is not enabled

Emmanuel Grumbach <[email protected]> wrote:

> 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: 2da4366f9e2c ("iwlwifi: mei: add the driver to allow cooperation with CSME")
> Reported-by: Jiri Slaby <[email protected]>
> Signed-off-by: Emmanuel Grumbach <[email protected]>
> Acked-by: Luca Coelho <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

fe6db7eda930 iwlwifi: mei: fix linking when tracing is not enabled

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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