mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -tip] sched: fix uninitialized variable usage
@ 2010-11-30  3:51 Lin Ming
  2010-11-30  3:54 ` Paul Turner
  0 siblings, 1 reply; 3+ messages in thread
From: Lin Ming @ 2010-11-30  3:51 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Turner, Ingo Molnar; +Cc: lkml

linux-2.6/kernel/sched.c: In function ‘sched_destroy_group’:
linux-2.6/kernel/sched.c:8101: warning: ‘i’ is used uninitialized in this function

This is caused by commit 3d4b47b(Implement on-demand (active) cfs_rq list)

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
---
 kernel/sched.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 717bf7d..c3af198 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8088,7 +8088,6 @@ static inline void unregister_fair_sched_group(struct task_group *tg, int cpu)
 {
 	struct rq *rq = cpu_rq(cpu);
 	unsigned long flags;
-	int i;
 
 	/*
 	* Only empty task groups can be destroyed; so we can speculatively
@@ -8098,7 +8097,7 @@ static inline void unregister_fair_sched_group(struct task_group *tg, int cpu)
 		return;
 
 	raw_spin_lock_irqsave(&rq->lock, flags);
-	list_del_leaf_cfs_rq(tg->cfs_rq[i]);
+	list_del_leaf_cfs_rq(tg->cfs_rq[cpu]);
 	raw_spin_unlock_irqrestore(&rq->lock, flags);
 }
 #else /* !CONFG_FAIR_GROUP_SCHED */



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

end of thread, other threads:[~2010-11-30  4:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-30  3:51 [PATCH -tip] sched: fix uninitialized variable usage Lin Ming
2010-11-30  3:54 ` Paul Turner
2010-11-30  4:28   ` Lin Ming

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

Powered by JetHome