]> 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>
Thu, 7 Feb 2013 01:26:02 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:11 +0000 (16:46 +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,