Skip to content

Commit 72b4e7e

Browse files
rostedtgregkh
authored andcommitted
tracing: samples: Initialize trace_array_printk() with the correct function
commit 1b0c192 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: [email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Divya Indi <[email protected]> Link: https://lore.kernel.org/[email protected] Fixes: 89ed424 ("tracing: Sample module to demonstrate kernel access to Ftrace instances.") Fixes: 38ce2a9 ("tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers") Signed-off-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 560877a commit 72b4e7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/ftrace/sample-trace-array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int __init sample_trace_array_init(void)
112112
/*
113113
* If context specific per-cpu buffers havent already been allocated.
114114
*/
115-
trace_printk_init_buffers();
115+
trace_array_init_printk(tr);
116116

117117
simple_tsk = kthread_run(simple_thread, NULL, "sample-instance");
118118
if (IS_ERR(simple_tsk)) {

0 commit comments

Comments
 (0)