public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing/filters: use list_for_each_entry_safe
@ 2009-03-23  8:26 Tom Zanussi
  2009-03-23  8:30 ` Li Zefan
  2009-03-23  8:31 ` [tip:tracing/filters] " Tom Zanussi
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Zanussi @ 2009-03-23  8:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Steven Rostedt, Frédéric Weisbecker

Use list_for_each_entry_safe instead of list_for_each_entry in
find_event_field().

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Reported-by: Frederic Weisbecker <fweisbec@gmail.com>

---
 kernel/trace/trace_events_filter.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 1ab20ce..c4a413b 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -147,11 +147,9 @@ int filter_print_preds(struct filter_pred **preds, char *buf)
 static struct ftrace_event_field *
 find_event_field(struct ftrace_event_call *call, char *name)
 {
-	struct ftrace_event_field *field;
-	struct list_head *entry, *tmp;
+	struct ftrace_event_field *field, *next;
 
-	list_for_each_safe(entry, tmp, &call->fields) {
-		field = list_entry(entry, struct ftrace_event_field, link);
+	list_for_each_entry_safe(field, next, &call->fields, link) {
 		if (!strcmp(field->name, name))
 			return field;
 	}
-- 
1.5.6.3




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-23  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-23  8:26 [PATCH] tracing/filters: use list_for_each_entry_safe Tom Zanussi
2009-03-23  8:30 ` Li Zefan
2009-03-23  8:33   ` Ingo Molnar
2009-03-23  8:31 ` [tip:tracing/filters] " Tom Zanussi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox