Commit 43bd1236 authored by Frederic Weisbecker's avatar Frederic Weisbecker
Browse files

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: default avatarFrederic Weisbecker <>
parent dbd3fbdf
......@@ -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? */
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) {
return -EINVAL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment