diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-22 04:32:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-25 10:34:17 -0500 |
commit | 7eee3e677d6e2e9007afcd7d79b0715525aa552e (patch) | |
tree | ab6f80a178701aa07fd045f65c2c6ef3596fec13 /kernel | |
parent | 70eee74b70c1a8485ec5f2bafa13dbc66fab6e02 (diff) |
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.c | 8 |
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) | |||
202 | 202 | ||
203 | static inline struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) | 203 | static inline struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) |
204 | { | 204 | { |
205 | struct rb_node *last; | 205 | struct rb_node *last = rb_last(&cfs_rq->tasks_timeline); |
206 | struct sched_entity *se; | ||
207 | 206 | ||
208 | last = rb_last(&cfs_rq->tasks_timeline); | ||
209 | if (!last) | 207 | if (!last) |
210 | return NULL; | 208 | return NULL; |
211 | se = rb_entry(last, struct sched_entity, run_node); | 209 | |
212 | return se; | 210 | return rb_entry(last, struct sched_entity, run_node); |
213 | } | 211 | } |
214 | 212 | ||
215 | /************************************************************** | 213 | /************************************************************** |