mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* sched: Cleanup duplicate local variable in {enqueue_dequeue}_task_fair
@ 2011-07-22  1:14 Lin Ming
  2011-07-22 12:55 ` [tip:sched/core] sched: Cleanup duplicate local variable in [enqueue|dequeue]_task_fair tip-bot for Lin Ming
  0 siblings, 1 reply; 2+ messages in thread
From: Lin Ming @ 2011-07-22  1:14 UTC (permalink / raw)
  To: Peter Zijlstra, mingo; +Cc: lkml

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>
---
 kernel/sched_fair.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index e7d67a9..47d6b17 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1336,7 +1336,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);
@@ -1376,7 +1376,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);



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-22 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-22  1:14 sched: Cleanup duplicate local variable in {enqueue_dequeue}_task_fair Lin Ming
2011-07-22 12:55 ` [tip:sched/core] sched: Cleanup duplicate local variable in [enqueue|dequeue]_task_fair tip-bot for Lin Ming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®