Re: [PATCH] tracing: always provide a prototype for tracing_alloc_snapshot()

From: Steven Rostedt

Date: Tue Mar 31 2026 - 12:29:04 EST


On Tue, 31 Mar 2026 18:20:36 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> On Tue, 31 Mar 2026 10:20:01 +0200
> Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx> wrote:
>
> > The tracing_alloc_snapshot() symbol is always exported even with
> > !CONFIG_TRACER_SNAPSHOT so the prototype too must be always visible or
> > we'll see the following warning:
> >
> > kernel/trace/trace.c:820:5: warning: no previous prototype for ‘tracing_alloc_snapshot’ [-Wmissing-prototypes]
> > 820 | int tracing_alloc_snapshot(void)
> > | ^~~~~~~~~~~~~~~~~~~~~~
> >
> > Fixes: bade44fe5462 ("tracing: Move snapshot code out of trace.c and into trace_snapshot.c")
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
>
> Good catch!
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

But is the wrong fix. I already fixed it properly:

https://patch.msgid.link/20260328101946.2c4ef4a5@robin

It's still in the testing phase but will be going to linux-next this week.

-- Steve