From: Mike Travis Date: Sat, 19 Jul 2008 01:11:28 +0000 (-0700) Subject: NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c X-Git-Tag: upstream/snapshot3+hdmi~24131^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2ad47ffeb1d292b7c7d1e2f6aedb37646c391db;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c * Use nr_cpu_ids instead of NR_CPUS to limit traversal of cpu online map. Signed-off-by: Mike Travis Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 0d0d905..a26c480 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c @@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) { if (*pos == 0) /* just in case, cpu 0 is not the first */ *pos = first_cpu(cpu_online_map); - if ((*pos) < NR_CPUS && cpu_online(*pos)) + if ((*pos) < nr_cpu_ids && cpu_online(*pos)) return &cpu_data(*pos); return NULL; }