summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-02-22 10:32:21 +0100
committerIngo Molnar <mingo@elte.hu>2008-02-25 16:34:17 +0100
commit7eee3e677d6e2e9007afcd7d79b0715525aa552e (patch)
treeab6f80a178701aa07fd045f65c2c6ef3596fec13 /kernel
parent70eee74b70c1a8485ec5f2bafa13dbc66fab6e02 (diff)
downloadlinux-7eee3e677d6e2e9007afcd7d79b0715525aa552e.tar.bz2
sched: clean up __pick_last_entity() a bit
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 7abad50d935f..c8e6492c5925 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);
}
/**************************************************************