Skip to content

Commit

Permalink
sched: Cleanup duplicate local variable in [enqueue|dequeue]_task_fair
Browse files Browse the repository at this point in the history
No need to define a new "cfs_rq" variable in the "for" block.
Just use the one at the top of the function.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1311297271.3938.1352.camel@minggr.sh.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Lin Ming authored and Ingo Molnar committed Jul 22, 2011
1 parent 2bd2d6f commit 0f31714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
}

for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
cfs_rq = cfs_rq_of(se);

update_cfs_load(cfs_rq, 0);
update_cfs_shares(cfs_rq);
Expand Down Expand Up @@ -1360,7 +1360,7 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
}

for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
cfs_rq = cfs_rq_of(se);

update_cfs_load(cfs_rq, 0);
update_cfs_shares(cfs_rq);
Expand Down

0 comments on commit 0f31714

Please sign in to comment.