Skip to content

Commit

Permalink
init/main.c: make setup_max_cpus static for !SMP
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
H Hartley Sweeten authored and torvalds committed Mar 6, 2010
1 parent cfd8d6c commit 7463e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,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

/*
Expand Down

0 comments on commit 7463e63

Please sign in to comment.