On Mon, Sep 19, 2022 at 09:34:04PM +0800, Ren Zhijie wrote: > If CONFIG_TRACING is not set, > make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, > will be failed, like this: > > drivers/scsi/qla2xxx/qla_os.c: In function ‘qla_trace_init’: > drivers/scsi/qla2xxx/qla_os.c:2854:18: error: implicit declaration of function ‘trace_array_get_by_name’; did you mean ‘trace_array_set_clr_event’? [-Werror=implicit-function-declaration] > qla_trc_array = trace_array_get_by_name("qla2xxx"); > ^~~~~~~~~~~~~~~~~~~~~~~ > trace_array_set_clr_event > drivers/scsi/qla2xxx/qla_os.c:2854:16: error: assignment makes pointer from integer without a cast [-Werror=int-conversion] > qla_trc_array = trace_array_get_by_name("qla2xxx"); > ^ > drivers/scsi/qla2xxx/qla_os.c: In function ‘qla_trace_uninit’: > drivers/scsi/qla2xxx/qla_os.c:2869:2: error: implicit declaration of function ‘trace_array_put’; did you mean ‘trace_seq_putc’? [-Werror=implicit-function-declaration] > trace_array_put(qla_trc_array); > ^~~~~~~~~~~~~~~ > trace_seq_putc > cc1: all warnings being treated as errors > > To fix this error, wrap up all the relevant code with CONFIG_TRACING. > > Fixes: 8bfc149ba24c ("scsi: qla2xxx: Enhance driver tracing with separate tunable and more") > Signed-off-by: Ren Zhijie <renzhijie2@xxxxxxxxxx> Reviewed-by: Daniel Wagner <dwagner@xxxxxxx>