Re: include/trace/stages/init.h:2:23: warning: 'str__irq_vectors__trace_system_name' defined but not used

From: Steven Rostedt
Date: Tue May 10 2022 - 10:33:43 EST


On Tue, 10 May 2022 09:44:59 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> Hmm, when I do:
>
> $ make arch/x86/kernel/irq.i
> $ astyle arch/x86/kernel/irq.i
> $ grep str__irq_irq_vectors__trace_system_name
>
> static const char str__irq_vectors__trace_system_name[] = "irq_vectors";
> static struct trace_event_class __attribute__((__used__)) __attribute__((__section__(".ref.data"))) event_class_x86_irq_vector = { .system = str__irq_vectors__trace_system_name, .fields_array = trace_event_fields_x86_irq_vector, .fields = { &(event_class_x86_irq_vector.fields), &(event_class_x86_irq_vector.fields) }, .raw_init = trace_event_raw_init, .probe = trace_event_raw_event_x86_irq_vector, .reg = trace_event_reg, .perf_probe = perf_trace_x86_irq_vector, };

Or is it because it is used only in initdata?

I guess I can check if it is referenced afterward anywhere, and set it to
initdata as well, if that's the case.

-- Steve