summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_stat.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-05-30 04:25:30 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2009-06-02 01:18:33 +0200
commit43bd1236234cacbc18d1476a9b57e7a306efddf5 (patch)
tree087fd59a2f98e85fdf017267998a7364a47536c3 /kernel/trace/trace_stat.c
parentdbd3fbdfeecfad4e71139db05d72560c3583e2a9 (diff)
downloadblackbird-op-linux-43bd1236234cacbc18d1476a9b57e7a306efddf5.tar.gz
blackbird-op-linux-43bd1236234cacbc18d1476a9b57e7a306efddf5.zip
tracing/stat: remove unappropriate safe walk on list
register_stat_tracer() uses list_for_each_entry_safe to check whether a tracer is already present in the list. But we don't delete anything from the list here, so we don't need the safe version [ Impact: cleanup list use is stat tracing ] Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace/trace_stat.c')
-rw-r--r--kernel/trace/trace_stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index 17f20ebdad2a..c00643733f4c 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -316,7 +316,7 @@ static int init_stat_file(struct stat_session *session)
int register_stat_tracer(struct tracer_stat *trace)
{
- struct stat_session *session, *node, *tmp;
+ struct stat_session *session, *node;
int ret;
if (!trace)
@@ -327,7 +327,7 @@ int register_stat_tracer(struct tracer_stat *trace)
/* Already registered? */
mutex_lock(&all_stat_sessions_mutex);
- list_for_each_entry_safe(node, tmp, &all_stat_sessions, session_list) {
+ list_for_each_entry(node, &all_stat_sessions, session_list) {
if (node->ts == trace) {
mutex_unlock(&all_stat_sessions_mutex);
return -EINVAL;
OpenPOWER on IntegriCloud