From ae4603712c9f3a49d67015f6386c520a77319ffa Mon Sep 17 00:00:00 2001 From: Arun Easi 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); | ^~~~~~~~~~~~~~~ Reported-by: kernel test robot --- drivers/scsi/qla2xxx/qla_def.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 3ec6a200942e..d0da737e51e2 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -35,6 +35,13 @@ #include +#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; -- 2.27.0