]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sched-proc-sched_stat-fails-on-very-very-large-machines-v2-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:13:50 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:14 +0000 (16:52 +1100)
fix warnings

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Nathan Zimmer <nzimmer@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/sched/stats.c

index fd65d76d5fb812825d8c8e04df9ea0a5b89459fd..e036eda1a9c9b422766447bf5006a70fde47155b 100644 (file)
@@ -25,14 +25,13 @@ static int show_schedstat(struct seq_file *seq, void *v)
                seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION);
                seq_printf(seq, "timestamp %lu\n", jiffies);
        } else {
-
-               cpu = (unsigned long)(v - 2);
-
-               struct rq *rq = cpu_rq(cpu);
+               struct rq *rq;
 #ifdef CONFIG_SMP
                struct sched_domain *sd;
                int dcount = 0;
 #endif
+               cpu = (unsigned long)(v - 2);
+               rq = cpu_rq(cpu);
 
                /* runqueue-specific stats */
                seq_printf(seq,