diff options
| author | Steven Rostedt <rostedt@goodmis.org> | 2025-05-09 15:26:57 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-22 14:08:25 +0200 |
| commit | 72b4e7e9a1599914e3829ee6e2952984dda1c4c5 (patch) | |
| tree | accb45ecf5770a50fbb0c2ad7b4b599fdd4391b1 | |
| parent | 560877a88d04757a616b9707ddd1cb6f3e2ad3b7 (diff) | |
| download | linux-72b4e7e9a1599914e3829ee6e2952984dda1c4c5.tar.gz linux-72b4e7e9a1599914e3829ee6e2952984dda1c4c5.tar.bz2 linux-72b4e7e9a1599914e3829ee6e2952984dda1c4c5.zip | |
tracing: samples: Initialize trace_array_printk() with the correct function
commit 1b0c192c92ea1fe2dcb178f84adf15fe37c3e7c8 upstream.
When using trace_array_printk() on a created instance, the correct
function to use to initialize it is:
trace_array_init_printk()
Not
trace_printk_init_buffer()
The former is a proper function to use, the latter is for initializing
trace_printk() and causes the NOTICE banner to be displayed.
Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Divya Indi <divya.indi@oracle.com>
Link: https://lore.kernel.org/20250509152657.0f6744d9@gandalf.local.home
Fixes: 89ed42495ef4a ("tracing: Sample module to demonstrate kernel access to Ftrace instances.")
Fixes: 38ce2a9e33db6 ("tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | samples/ftrace/sample-trace-array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/ftrace/sample-trace-array.c b/samples/ftrace/sample-trace-array.c index 6aba02a31c96..77685a7eb767 100644 --- a/samples/ftrace/sample-trace-array.c +++ b/samples/ftrace/sample-trace-array.c @@ -112,7 +112,7 @@ static int __init sample_trace_array_init(void) /* * If context specific per-cpu buffers havent already been allocated. */ - trace_printk_init_buffers(); + trace_array_init_printk(tr); simple_tsk = kthread_run(simple_thread, NULL, "sample-instance"); if (IS_ERR(simple_tsk)) { |
