From: Lin Ming Date: Fri, 22 Jul 2011 01:14:31 +0000 (+0800) Subject: sched: Cleanup duplicate local variable in [enqueue|dequeue]_task_fair X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f3171438fc917b9f6b8b60dbb7a3fff9a0f68fd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sched: Cleanup duplicate local variable in [enqueue|dequeue]_task_fair 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 Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1311297271.3938.1352.camel@minggr.sh.intel.com Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a2ecbaa28b4c..bc8ee9993814 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -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); @@ -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);