* [PATCH] init/main.c: make setup_max_cpus static for !SMP
@ 2010-01-13 22:32 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2010-01-13 22:32 UTC (permalink / raw)
To: Linux Kernel
init/main.c: make setup_max_cpus static for !SMP
The only in tree external users of the symbol setup_max_cpus are in
arch/x86/. The files ./kernel/alternative.c, ./kernel/visws_quirks.c, and
./mm/kmemcheck/kmemcheck.c are all guarded by CONFIG_SMP
being defined. For this case the symbol is an unsigned int and
declared as an extern in include/linux/smp.h.
When CONFIG_SMP is not defined the symbol setup_max_cpus is
a constant value that is only used in init/main.c. Make the symbol
static for this case.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
diff --git a/init/main.c b/init/main.c
index dac44a9..7110851 100644
--- a/init/main.c
+++ b/init/main.c
@@ -160,7 +160,7 @@ static int __init maxcpus(char *str)
early_param("maxcpus", maxcpus);
#else
-const unsigned int setup_max_cpus = NR_CPUS;
+static const unsigned int setup_max_cpus = NR_CPUS;
#endif
/*
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-13 22:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 22:32 [PATCH] init/main.c: make setup_max_cpus static for !SMP H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox