aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorzhangwei(Jovi) <jovi.zhangwei@huawei.com>2013-03-11 03:13:29 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 13:22:05 -0400
commit687c878afb526a0c3117dbc408ca76ad80d689f7 (patch)
tree235c0d1a9e293dfecde5d28dc42ff51e9452df62 /kernel/trace
parent6c43e554a2a5c1f2caf1733d46719bc58de3e37b (diff)
tracing: Use pr_warn_once instead of open coded implementation
Use pr_warn_once, instead of making an open coded implementation. Link: http://lkml.kernel.org/r/513D8419.20400@huawei.com Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7f0e7fa6d62c..bba1ba958ee8 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5205,8 +5205,6 @@ static inline int register_snapshot_cmd(void) { return 0; }
5205 5205
5206struct dentry *tracing_init_dentry_tr(struct trace_array *tr) 5206struct dentry *tracing_init_dentry_tr(struct trace_array *tr)
5207{ 5207{
5208 static int once;
5209
5210 if (tr->dir) 5208 if (tr->dir)
5211 return tr->dir; 5209 return tr->dir;
5212 5210
@@ -5216,11 +5214,8 @@ struct dentry *tracing_init_dentry_tr(struct trace_array *tr)
5216 if (tr->flags & TRACE_ARRAY_FL_GLOBAL) 5214 if (tr->flags & TRACE_ARRAY_FL_GLOBAL)
5217 tr->dir = debugfs_create_dir("tracing", NULL); 5215 tr->dir = debugfs_create_dir("tracing", NULL);
5218 5216
5219 if (!tr->dir && !once) { 5217 if (!tr->dir)
5220 once = 1; 5218 pr_warn_once("Could not create debugfs directory 'tracing'\n");
5221 pr_warning("Could not create debugfs directory 'tracing'\n");
5222 return NULL;
5223 }
5224 5219
5225 return tr->dir; 5220 return tr->dir;
5226} 5221}