ftrace: Return NULL at end of t_start() instead of calling t_hash_start()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 30 Mar 2017 01:40:49 +0000 (21:40 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 31 Mar 2017 22:00:37 +0000 (18:00 -0400)
The loop in t_start() of calling t_next() will call t_hash_start() if the
pos is beyond the functions and enters the hash items. There's no reason to
check if p is NULL and call t_hash_start(), as that would be redundant.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ftrace.c

index 3165b7f840e6cf94aa6aff5f5f44d98995106d4e..421530831ddddd6539461b3d95b801bbb04283c6 100644 (file)
@@ -3255,7 +3255,7 @@ static void *t_start(struct seq_file *m, loff_t *pos)
        }
 
        if (!p)
-               return t_hash_start(m, pos);
+               return NULL;
 
        return iter;
 }