From: Ingo Molnar Date: Fri, 22 Feb 2008 09:32:21 +0000 (+0100) Subject: sched: clean up __pick_last_entity() a bit X-Git-Tag: v2.6.25-rc4~160^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eee3e677d6e2e9007afcd7d79b0715525aa552e;p=linux-2.6 sched: clean up __pick_last_entity() a bit Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 7abad50d93..c8e6492c59 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -202,14 +202,12 @@ static struct sched_entity *__pick_next_entity(struct cfs_rq *cfs_rq) static inline struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) { - struct rb_node *last; - struct sched_entity *se; + struct rb_node *last = rb_last(&cfs_rq->tasks_timeline); - last = rb_last(&cfs_rq->tasks_timeline); if (!last) return NULL; - se = rb_entry(last, struct sched_entity, run_node); - return se; + + return rb_entry(last, struct sched_entity, run_node); } /**************************************************************