diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-03-26 19:25:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 08:43:07 -0400 |
commit | 5452af664f6fba26b80eb2c8c4ceae2999d5cf56 (patch) | |
tree | 08fb64bfc3242ad96b65719a55424db729585f17 /kernel/trace/trace_sysprof.c | |
parent | a5dec5573f3c7e63f2f9b5852b9759ea342a5ff9 (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/trace_sysprof.c')
-rw-r--r-- | kernel/trace/trace_sysprof.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c index 91fd19c2149f..e04b76cc238a 100644 --- a/kernel/trace/trace_sysprof.c +++ b/kernel/trace/trace_sysprof.c | |||
@@ -321,11 +321,7 @@ static const struct file_operations sysprof_sample_fops = { | |||
321 | 321 | ||
322 | void init_tracer_sysprof_debugfs(struct dentry *d_tracer) | 322 | void init_tracer_sysprof_debugfs(struct dentry *d_tracer) |
323 | { | 323 | { |
324 | struct dentry *entry; | ||
325 | 324 | ||
326 | entry = debugfs_create_file("sysprof_sample_period", 0644, | 325 | trace_create_file("sysprof_sample_period", 0644, |
327 | d_tracer, NULL, &sysprof_sample_fops); | 326 | d_tracer, NULL, &sysprof_sample_fops); |
328 | if (entry) | ||
329 | return; | ||
330 | pr_warning("Could not create debugfs 'sysprof_sample_period' entry\n"); | ||
331 | } | 327 | } |