Commit 57cb499d authored by Ingo Molnar's avatar Ingo Molnar

sched: remove set_leftmost()

Lee Schermerhorn noticed that set_leftmost() contains dead code,
remove this.
Reported-by: default avatarLee Schermerhorn <Lee.Schermerhorn@hp.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 2ddbf952
...@@ -124,16 +124,6 @@ max_vruntime(u64 min_vruntime, u64 vruntime) ...@@ -124,16 +124,6 @@ max_vruntime(u64 min_vruntime, u64 vruntime)
return min_vruntime; return min_vruntime;
} }
static inline void
set_leftmost(struct cfs_rq *cfs_rq, struct rb_node *leftmost)
{
struct sched_entity *se;
cfs_rq->rb_leftmost = leftmost;
if (leftmost)
se = rb_entry(leftmost, struct sched_entity, run_node);
}
static inline s64 static inline s64
entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se) entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se)
{ {
...@@ -175,7 +165,7 @@ __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) ...@@ -175,7 +165,7 @@ __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
* used): * used):
*/ */
if (leftmost) if (leftmost)
set_leftmost(cfs_rq, &se->run_node); cfs_rq->rb_leftmost = &se->run_node;
rb_link_node(&se->run_node, parent, link); rb_link_node(&se->run_node, parent, link);
rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline); rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline);
...@@ -185,7 +175,7 @@ static void ...@@ -185,7 +175,7 @@ static void
__dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) __dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
{ {
if (cfs_rq->rb_leftmost == &se->run_node) if (cfs_rq->rb_leftmost == &se->run_node)
set_leftmost(cfs_rq, rb_next(&se->run_node)); cfs_rq->rb_leftmost = rb_next(&se->run_node);
rb_erase(&se->run_node, &cfs_rq->tasks_timeline); rb_erase(&se->run_node, &cfs_rq->tasks_timeline);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment