From: Matthias Kaehlcke Date: Mon, 15 Oct 2007 15:00:02 +0000 (+0200) Subject: sched: use list_for_each_entry_safe() in __wake_up_common() X-Git-Tag: v2.6.24-rc1~1289^2~137 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e45874c5aabe573b6ab4328f303c765701394f9;p=linux-2.6 sched: use list_for_each_entry_safe() in __wake_up_common() Use list_for_each_entry_safe() instead of list_for_each_safe() in __wake_up_common() Signed-off-by: Matthias Kaehlcke Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra Signed-off-by: Mike Galbraith Reviewed-by: Thomas Gleixner --- diff --git a/kernel/sched.c b/kernel/sched.c index 2054e557d0..e92b185e37 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3634,10 +3634,9 @@ EXPORT_SYMBOL(default_wake_function); static void __wake_up_common(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, int sync, void *key) { - struct list_head *tmp, *next; + wait_queue_t *curr, *next; - list_for_each_safe(tmp, next, &q->task_list) { - wait_queue_t *curr = list_entry(tmp, wait_queue_t, task_list); + list_for_each_entry_safe(curr, next, &q->task_list, task_list) { unsigned flags = curr->flags; if (curr->func(curr, mode, sync, key) &&