Skip to contentSkip to conversation

build failure of next-20220906 due to 8bfc149ba24c ("scsi: qla2xxx: Enhance driver tracing with separate tunable and more")

DISCUSSION Sudip Mukherjee (Codethink) 3 participants 8 messages Sep 6, 2022

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

Hi All,

The builds of loongarch loongson3_defconfig have failed to build next-20220906 with the error:

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_init':
drivers/scsi/qla2xxx/qla_os.c:2854:25: error: implicit declaration of function 'trace_array_get_by_name'; did you mean 'trace_array_set_clr_event'? [-Werror=implicit-function-declaration]

 2854 |         qla_trc_array = trace_array_get_by_name("qla2xxx");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
      |                         trace_array_set_clr_event

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_uninit':
drivers/scsi/qla2xxx/qla_os.c:2869:9: error: implicit declaration of function 'trace_array_put' [-Werror=implicit-function-declaration]

 2869 |         trace_array_put(qla_trc_array);
      |         ^~~~~~~~~~~~~~~

git bisect pointed to 8bfc149ba24c ("scsi: qla2xxx: Enhance driver tracing with separate tunable and more").

I will be happy to test any patch or provide any extra log if needed.

--
Regards
Sudip

#1 lore raw

Hi Sudip,

Quoted 16 lines · Sudip Mukherjee (Codethink)

External Email

----------------------------------------------------------------------
Hi All,

The builds of loongarch loongson3_defconfig have failed to build next-20220906 with the error:

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_init':
drivers/scsi/qla2xxx/qla_os.c:2854:25: error: implicit declaration of function 'trace_array_get_by_name'; did you mean 'trace_array_set_clr_event'? [-Werror=implicit-function-declaration]

 2854 |         qla_trc_array = trace_array_get_by_name("qla2xxx");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
      |                         trace_array_set_clr_event

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_uninit':
drivers/scsi/qla2xxx/qla_os.c:2869:9: error: implicit declaration of function 'trace_array_put' [-Werror=implicit-function-declaration]

Quoted 9 lines
 2869 |         trace_array_put(qla_trc_array);
      |         ^~~~~~~~~~~~~~~

git bisect pointed to 8bfc149ba24c ("scsi: qla2xxx: Enhance driver tracing with separate tunable and more").

I will be happy to test any patch or provide any extra log if needed.

This looks like is happening due to CONFIG_TRACING not being enabled (same as what kernel test bot reported). Could you try out the fix attached?

@Steven, please see the patch attached. Do you think the fix belongs better in linux/trace.h ?

Regards,
-Arun

From ae4603712c9f3a49d67015f6386c520a77319ffa Mon Sep 17 00:00:00 2001
From: Arun Easi <[email protected]>
Date: Fri, 2 Sep 2022 17:53:30 -0700
Subject: [PATCH] fixup! qla2xxx: Enhance driver tracing with separate tunable
and more

Fix this compilation error seen when CONFIG_TRACING is not enabled:

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_init':
drivers/scsi/qla2xxx/qla_os.c:2854:25: error: implicit declaration of function 'trace_array_get_by_name'; did you mean 'trace_array_set_clr_event'? [-Werror=implicit-function-declaration]

 2854 |         qla_trc_array = trace_array_get_by_name("qla2xxx");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
      |                         trace_array_set_clr_event

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_uninit':
drivers/scsi/qla2xxx/qla_os.c:2869:9: error: implicit declaration of function 'trace_array_put' [-Werror=implicit-function-declaration]

 2869 |         trace_array_put(qla_trc_array);
      |         ^~~~~~~~~~~~~~~
---
 drivers/scsi/qla2xxx/qla_def.h | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/scsi/qla2xxx/qla_def.h +7 -0
index 3ec6a200942e..d0da737e51e2 100644
@@ -35,6 +35,13 @@
 
 #include <uapi/scsi/fc/fc_els.h>
 
+#ifndef CONFIG_TRACING
+#ifndef trace_array_get_by_name
+#define trace_array_get_by_name(_trc_arr)	NULL
+#define trace_array_put(_trc_arr)
+#endif /* trace_array_get_by_name */
+#endif /* CONFIG_TRACING */
+
 /* Big endian Fibre Channel S_ID (source ID) or D_ID (destination ID). */
 typedef struct {
 	uint8_t domain;
Signature · 1 line
2.27.0
#2 lore raw
Quoted 5 lines · On Tue, 6 Sep 2022 09:05:38 -0700 Arun Easi <[email protected]> wrote:

This looks like is happening due to CONFIG_TRACING not being enabled (same as what kernel test bot reported). Could you try out the fix attached?

@Steven, please see the patch attached. Do you think the fix belongs better in linux/trace.h ?

Yes, of course. Feel free to send me a patch.

Thanks!

-- Steve

author Tested-by
#3 lore raw
In reply to Arun Easi
Quoted 25 lines · Arun Easi

Hi Sudip,

Quoted 20 lines · Sudip Mukherjee (Codethink)

External Email

----------------------------------------------------------------------
Hi All,

The builds of loongarch loongson3_defconfig have failed to build next-20220906 with the error:

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_init':
drivers/scsi/qla2xxx/qla_os.c:2854:25: error: implicit declaration of function 'trace_array_get_by_name'; did you mean 'trace_array_set_clr_event'? [-Werror=implicit-function-declaration]

 2854 |         qla_trc_array = trace_array_get_by_name("qla2xxx");
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
      |                         trace_array_set_clr_event

drivers/scsi/qla2xxx/qla_os.c: In function 'qla_trace_uninit':
drivers/scsi/qla2xxx/qla_os.c:2869:9: error: implicit declaration of function 'trace_array_put' [-Werror=implicit-function-declaration]

 2869 |         trace_array_put(qla_trc_array);
      |         ^~~~~~~~~~~~~~~
Quoted 8 lines
Quoted 5 lines

git bisect pointed to 8bfc149ba24c ("scsi: qla2xxx: Enhance driver tracing with separate tunable and more").

I will be happy to test any patch or provide any extra log if needed.

This looks like is happening due to CONFIG_TRACING not being enabled (same as what kernel test bot reported). Could you try out the fix attached?

Thanks, that fixed the build for me. The patch did not apply directly on next-20220906, so I had to modify it a little bit.

Signature · 2 lines
Regards
Sudip
#5 lore raw
Quoted 10 lines · Steven Rostedt
Quoted 4 lines · On Tue, 6 Sep 2022 21:57:10 +0100 Sudip Mukherjee <[email protected]>…

Thanks, that fixed the build for me. The patch did not apply directly on next-20220906, so I had to modify it a little bit.

Well, the change needs to go into include/linux/trace.h though.

Steve, I was thinking both the fixes stay at least for a short term the one in qla2xxx to avoid tree dependencies.

Since, the qla_def.h change goes as:

+#ifndef CONFIG_TRACING
+#ifndef trace_array_get_by_name

..it should co-exist when the "#define trace_array_get_by_name" gets merged in include/linux/trace.h. BTW, I will send out the changes to trace.h today.

Other alternatives/suggestions welcome.

Regards,
-Arun

#6 lore raw
Quoted 8 lines · On Tue, 6 Sep 2022 14:26:31 -0700 Arun Easi <[email protected]> wrote:

Steve, I was thinking both the fixes stay at least for a short term the one in qla2xxx to avoid tree dependencies.

Since, the qla_def.h change goes as:

drivers/scsi/qla2xxx/qla_def.h +2 -0
+#ifndef CONFIG_TRACING
+#ifndef trace_array_get_by_name
Quoted 5 lines

..it should co-exist when the "#define trace_array_get_by_name" gets merged in include/linux/trace.h. BTW, I will send out the changes to trace.h today.

Other alternatives/suggestions welcome.

I doubt I'll have anything that conflicts with an update to include/linux/trace.h, as it is seldom modified.

Just sent a patch out that updates that file and I'll review it, and then you can push it through your tree.

-- Steve

#7 lore raw
Quoted 15 lines · Steven Rostedt
Quoted 12 lines · On Tue, 6 Sep 2022 14:26:31 -0700 Arun Easi <[email protected]> wrote:

Steve, I was thinking both the fixes stay at least for a short term the one in qla2xxx to avoid tree dependencies.

Since, the qla_def.h change goes as:

drivers/scsi/qla2xxx/qla_def.h +2 -0
+#ifndef CONFIG_TRACING
+#ifndef trace_array_get_by_name

..it should co-exist when the "#define trace_array_get_by_name" gets merged in include/linux/trace.h. BTW, I will send out the changes to trace.h today.

Quoted 8 lines
Quoted 1 line

Other alternatives/suggestions welcome.

I doubt I'll have anything that conflicts with an update to include/linux/trace.h, as it is seldom modified.

Just sent a patch out that updates that file and I'll review it, and then you can push it through your tree.

Sounds good. Thanks Steve.

Regards,
-Arun