aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-03-26 19:25:38 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-07 08:43:07 -0400
commit5452af664f6fba26b80eb2c8c4ceae2999d5cf56 (patch)
tree08fb64bfc3242ad96b65719a55424db729585f17 /kernel/trace/ring_buffer.c
parenta5dec5573f3c7e63f2f9b5852b9759ea342a5ff9 (diff)
tracing/ftrace: factorize the tracing files creation
Impact: cleanup Most of the tracing files creation follow the same pattern: ret = debugfs_create_file(...) if (!ret) pr_warning("Couldn't create ... entry\n") Unify it! Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1238109938-11840-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r--kernel/trace/ring_buffer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 960cbf44c844..74a11808c282 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2845,14 +2845,11 @@ static const struct file_operations rb_simple_fops = {
2845static __init int rb_init_debugfs(void) 2845static __init int rb_init_debugfs(void)
2846{ 2846{
2847 struct dentry *d_tracer; 2847 struct dentry *d_tracer;
2848 struct dentry *entry;
2849 2848
2850 d_tracer = tracing_init_dentry(); 2849 d_tracer = tracing_init_dentry();
2851 2850
2852 entry = debugfs_create_file("tracing_on", 0644, d_tracer, 2851 trace_create_file("tracing_on", 0644, d_tracer,
2853 &ring_buffer_flags, &rb_simple_fops); 2852 &ring_buffer_flags, &rb_simple_fops);
2854 if (!entry)
2855 pr_warning("Could not create debugfs 'tracing_on' entry\n");
2856 2853
2857 return 0; 2854 return 0;
2858} 2855}