Commit 1b0c192c authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt (Google)
Browse files

tracing: samples: Initialize trace_array_printk() with the correct function

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: 89ed4249 ("tracing: Sample module to demonstrate kernel access to Ftrace instances.")
Fixes: 38ce2a9e ("tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers")
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 82f2b0b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {