From: Vaidyanathan Srinivasan Date: Sat, 20 Dec 2008 04:36:38 +0000 (+0530) Subject: sched: nominate preferred wakeup cpu, fix X-Git-Tag: v2.6.29-rc1~538^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=36dffab679c7eeb91c2507400cf4da6e9e01164e;p=linux-2.6-omap-h63xx.git sched: nominate preferred wakeup cpu, fix Andrew Morton reported: > kernel/sched.c: In function 'schedule': > kernel/sched.c:3679: warning: 'active_balance' may be used uninitialized in this function > > This warning is correct - the code is buggy. In sched.c load_balance_newidle, there's real potential use of uninitialised variable - fix it. Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index ae5ca3f9e77..756d981d91a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3670,7 +3670,7 @@ redo: } if (!ld_moved) { - int active_balance; + int active_balance = 0; schedstat_inc(sd, lb_failed[CPU_NEWLY_IDLE]); if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER &&