mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
tracing: Remove duplicate warnings when calling trace_create_file()
Since the same warning message is already printed in the trace_create_file() function, there is no need to print it again. Link: https://lkml.kernel.org/r/20220109162232.361747-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang <ytcoode@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
dfea08a211
commit
6e1b4bd191
@ -3461,10 +3461,8 @@ create_event_toplevel_files(struct dentry *parent, struct trace_array *tr)
|
||||
|
||||
entry = trace_create_file("enable", TRACE_MODE_WRITE, d_events,
|
||||
tr, &ftrace_tr_enable_fops);
|
||||
if (!entry) {
|
||||
pr_warn("Could not create tracefs 'enable' entry\n");
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* There are not as crucial, just warn if they are not created */
|
||||
|
||||
@ -3480,17 +3478,13 @@ create_event_toplevel_files(struct dentry *parent, struct trace_array *tr)
|
||||
pr_warn("Could not create tracefs 'set_event_notrace_pid' entry\n");
|
||||
|
||||
/* ring buffer internal formats */
|
||||
entry = trace_create_file("header_page", TRACE_MODE_READ, d_events,
|
||||
trace_create_file("header_page", TRACE_MODE_READ, d_events,
|
||||
ring_buffer_print_page_header,
|
||||
&ftrace_show_header_fops);
|
||||
if (!entry)
|
||||
pr_warn("Could not create tracefs 'header_page' entry\n");
|
||||
|
||||
entry = trace_create_file("header_event", TRACE_MODE_READ, d_events,
|
||||
trace_create_file("header_event", TRACE_MODE_READ, d_events,
|
||||
ring_buffer_print_entry_header,
|
||||
&ftrace_show_header_fops);
|
||||
if (!entry)
|
||||
pr_warn("Could not create tracefs 'header_event' entry\n");
|
||||
|
||||
tr->event_dir = d_events;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user