* [PATCH] trace: ftrace_dump_on_oops[] is not exported, make it static
@ 2026-01-06 23:10 Ben Dooks
2026-01-06 23:41 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2026-01-06 23:10 UTC (permalink / raw)
To: linux-trace-kernel
Cc: linux-kernel, mhiramat, mathieu.desnoyers, rostedt, Ben Dooks
The ftrace_dump_on_oops string is not used outside of trace.c so
make it static to avoid the export warning from sparse:
kernel/trace/trace.c:141:6: warning: symbol 'ftrace_dump_on_oops' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 6f2148df14d9..5c196ea93768 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -138,7 +138,7 @@ cpumask_var_t __read_mostly tracing_buffer_mask;
* by commas.
*/
/* Set to string format zero to disable by default */
-char ftrace_dump_on_oops[MAX_TRACER_SIZE] = "0";
+static char ftrace_dump_on_oops[MAX_TRACER_SIZE] = "0";
/* When set, tracing will stop when a WARN*() is hit */
static int __disable_trace_on_warning;
--
2.37.2.352.g3c44437643
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] trace: ftrace_dump_on_oops[] is not exported, make it static
2026-01-06 23:10 [PATCH] trace: ftrace_dump_on_oops[] is not exported, make it static Ben Dooks
@ 2026-01-06 23:41 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2026-01-06 23:41 UTC (permalink / raw)
To: Ben Dooks; +Cc: linux-trace-kernel, linux-kernel, mhiramat, mathieu.desnoyers
On Tue, 6 Jan 2026 23:10:54 +0000
Ben Dooks <ben.dooks@codethink.co.uk> wrote:
> The ftrace_dump_on_oops string is not used outside of trace.c so
> make it static to avoid the export warning from sparse:
>
> kernel/trace/trace.c:141:6: warning: symbol 'ftrace_dump_on_oops' was not declared. Should it be static?
>
This could probably have:
Fixes: dd293df6395a2 ("tracing: Move trace sysctls into trace.c")
as that was the commit to move the usage of that variable back into the
defining file.
-- Steve
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> kernel/trace/trace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 6f2148df14d9..5c196ea93768 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -138,7 +138,7 @@ cpumask_var_t __read_mostly tracing_buffer_mask;
> * by commas.
> */
> /* Set to string format zero to disable by default */
> -char ftrace_dump_on_oops[MAX_TRACER_SIZE] = "0";
> +static char ftrace_dump_on_oops[MAX_TRACER_SIZE] = "0";
>
> /* When set, tracing will stop when a WARN*() is hit */
> static int __disable_trace_on_warning;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-06 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 23:10 [PATCH] trace: ftrace_dump_on_oops[] is not exported, make it static Ben Dooks
2026-01-06 23:41 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox