Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1617115 > unrolled thread

[for-next][PATCH 3/7] ftrace: Return NULL at end of t_start() instead of calling t_hash_start()

Started bySteven Rostedt <rostedt@goodmis.org>
First post2017-04-05 18:30 +0200
Last post2017-04-05 18:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [for-next][PATCH 3/7] ftrace: Return NULL at end of t_start() instead of calling  t_hash_start() Steven Rostedt <rostedt@goodmis.org> - 2017-04-05 18:30 +0200

#1617115 — [for-next][PATCH 3/7] ftrace: Return NULL at end of t_start() instead of calling t_hash_start()

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-04-05 18:30 +0200
Subject[for-next][PATCH 3/7] ftrace: Return NULL at end of t_start() instead of calling t_hash_start()
Message-ID<tsVYJ-4Y7-13@gated-at.bofh.it>
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 3165b7f840e6..421530831ddd 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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;
 }
-- 
2.10.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web