Commit 53fc190c authored by Yury Norov's avatar Yury Norov
Browse files

smp: don't declare nr_cpu_ids if NR_CPUS == 1



SMP and NR_CPUS are independent options, hence nr_cpu_ids may be
declared even if NR_CPUS == 1, which is useless.

Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
parent b9be19ee
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1088,9 +1088,11 @@ static int __init maxcpus(char *str)


early_param("maxcpus", maxcpus);
early_param("maxcpus", maxcpus);


#if (NR_CPUS > 1)
/* Setup number of possible processor ids */
/* Setup number of possible processor ids */
unsigned int nr_cpu_ids __read_mostly = NR_CPUS;
unsigned int nr_cpu_ids __read_mostly = NR_CPUS;
EXPORT_SYMBOL(nr_cpu_ids);
EXPORT_SYMBOL(nr_cpu_ids);
#endif


/* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */
/* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */
void __init setup_nr_cpu_ids(void)
void __init setup_nr_cpu_ids(void)