Re: [PATCH 1/2] tracing: Remove "__attribute__()" from the type field of event format

Steven Rostedt
2025-07-09T16:51:22Z

On Wed, 9 Jul 2025 09:06:10 +0800
kernel test robot <lkp@intel.com> wrote:

> kernel/trace/trace_events.c: In function 'sanitize_field_type':
> >> kernel/trace/trace_events.c:120:30: error: initializer element is not constant
> static const int attr_len = strlen(ATTRIBUTE_STR);
> ^~~~~~

I guess this could be fixed by making the above:

static const int attr_len = sizeof(ATTRIBUTE_STR) - 1;

-- Steve