tracing/filters: use list_for_each_entry_safe
authorTom Zanussi <tzanussi@gmail.com>
Mon, 23 Mar 2009 08:26:28 +0000 (03:26 -0500)
committerIngo Molnar <mingo@elte.hu>
Mon, 23 Mar 2009 08:28:07 +0000 (09:28 +0100)
Impact: cleanup

Use list_for_each_entry_safe instead of list_for_each_entry in
find_event_field().

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1237796788.7527.35.camel@charm-linux>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_events_filter.c

index 1ab20cee0e4c09a759da610393c63823f0564f1b..c4a413b70f78d932f35519bbf0a37defde00682f 100644 (file)
@@ -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;
        }