aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-03-23 04:26:28 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-23 04:28:07 -0400
commit75c8b417526529d0a7072e4d93ec99dbd483a6f4 (patch)
tree6b8e3577c1bde7df9a723a4c76c8d0d0af694271
parentb118415bfad6d75792a85ac999e25149db8e6919 (diff)
tracing/filters: use list_for_each_entry_safe
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>
-rw-r--r--kernel/trace/trace_events_filter.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 1ab20cee0e4c..c4a413b70f78 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)
147static struct ftrace_event_field * 147static struct ftrace_event_field *
148find_event_field(struct ftrace_event_call *call, char *name) 148find_event_field(struct ftrace_event_call *call, char *name)
149{ 149{
150 struct ftrace_event_field *field; 150 struct ftrace_event_field *field, *next;
151 struct list_head *entry, *tmp;
152 151
153 list_for_each_safe(entry, tmp, &call->fields) { 152 list_for_each_entry_safe(field, next, &call->fields, link) {
154 field = list_entry(entry, struct ftrace_event_field, link);
155 if (!strcmp(field->name, name)) 153 if (!strcmp(field->name, name))
156 return field; 154 return field;
157 } 155 }