Skip to content

Commit

Permalink
sched/fair: Clean up the __clear_buddies_*() functions
Browse files Browse the repository at this point in the history
Slightly easier code flow, no functional changes.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1328936700.2476.17.camel@laptop
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 10, 2014
1 parent 606dba2 commit f104479
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -2739,32 +2739,32 @@ static void __clear_buddies_last(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->last == se)
cfs_rq->last = NULL;
else
if (cfs_rq->last != se)
break;

cfs_rq->last = NULL;
}
}

static void __clear_buddies_next(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->next == se)
cfs_rq->next = NULL;
else
if (cfs_rq->next != se)
break;

cfs_rq->next = NULL;
}
}

static void __clear_buddies_skip(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->skip == se)
cfs_rq->skip = NULL;
else
if (cfs_rq->skip != se)
break;

cfs_rq->skip = NULL;
}
}

Expand Down

0 comments on commit f104479

Please sign in to comment.