sched: clean up __pick_last_entity() a bit
authorIngo Molnar <mingo@elte.hu>
Fri, 22 Feb 2008 09:32:21 +0000 (10:32 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 25 Feb 2008 15:34:17 +0000 (16:34 +0100)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index 7abad50d935ff0e348d430d3b24b20060c534123..c8e6492c5925f0dea503d48d04b9a12a6f0ade51 100644 (file)
@@ -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);
 }
 
 /**************************************************************