diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-03-27 00:25:38 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 14:43:07 +0200 |
commit | 5452af664f6fba26b80eb2c8c4ceae2999d5cf56 (patch) | |
tree | 08fb64bfc3242ad96b65719a55424db729585f17 /kernel/trace/ring_buffer.c | |
parent | a5dec5573f3c7e63f2f9b5852b9759ea342a5ff9 (diff) | |
download | op-kernel-dev-5452af664f6fba26b80eb2c8c4ceae2999d5cf56.zip op-kernel-dev-5452af664f6fba26b80eb2c8c4ceae2999d5cf56.tar.gz |
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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 960cbf4..74a1180 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 = { static __init int rb_init_debugfs(void) { struct dentry *d_tracer; - struct dentry *entry; d_tracer = tracing_init_dentry(); - entry = debugfs_create_file("tracing_on", 0644, d_tracer, - &ring_buffer_flags, &rb_simple_fops); - if (!entry) - pr_warning("Could not create debugfs 'tracing_on' entry\n"); + trace_create_file("tracing_on", 0644, d_tracer, + &ring_buffer_flags, &rb_simple_fops); return 0; } |