Skip to content

Commit

Permalink
NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c
Browse files Browse the repository at this point in the history
  * Use nr_cpu_ids instead of NR_CPUS to limit traversal of cpu online map.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jul 20, 2008
1 parent 6bca67f commit f2ad47f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f2ad47f

Please sign in to comment.