Commit 418508c13222ddba475873ea95c8aeadd26104f2
Committed by
Linus Torvalds
1 parent
ead5f0b5fa
Exists in
master
and in
7 other branches
fix unused setup_nr_node_ids
mm/page_alloc.c:931: warning: 'setup_nr_node_ids' defined but not used This is now the only (!) compiler warning I get in my UML build :) Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 25 additions and 20 deletions Side-by-side Diff
mm/page_alloc.c
... | ... | @@ -136,6 +136,11 @@ |
136 | 136 | #endif /* CONFIG_MEMORY_HOTPLUG_RESERVE */ |
137 | 137 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ |
138 | 138 | |
139 | +#if MAX_NUMNODES > 1 | |
140 | +int nr_node_ids __read_mostly = MAX_NUMNODES; | |
141 | +EXPORT_SYMBOL(nr_node_ids); | |
142 | +#endif | |
143 | + | |
139 | 144 | #ifdef CONFIG_DEBUG_VM |
140 | 145 | static int page_outside_zone_boundaries(struct zone *zone, struct page *page) |
141 | 146 | { |
... | ... | @@ -669,26 +674,6 @@ |
669 | 674 | return i; |
670 | 675 | } |
671 | 676 | |
672 | -#if MAX_NUMNODES > 1 | |
673 | -int nr_node_ids __read_mostly = MAX_NUMNODES; | |
674 | -EXPORT_SYMBOL(nr_node_ids); | |
675 | - | |
676 | -/* | |
677 | - * Figure out the number of possible node ids. | |
678 | - */ | |
679 | -static void __init setup_nr_node_ids(void) | |
680 | -{ | |
681 | - unsigned int node; | |
682 | - unsigned int highest = 0; | |
683 | - | |
684 | - for_each_node_mask(node, node_possible_map) | |
685 | - highest = node; | |
686 | - nr_node_ids = highest + 1; | |
687 | -} | |
688 | -#else | |
689 | -static void __init setup_nr_node_ids(void) {} | |
690 | -#endif | |
691 | - | |
692 | 677 | #ifdef CONFIG_NUMA |
693 | 678 | /* |
694 | 679 | * Called from the vmstat counter updater to drain pagesets of this |
... | ... | @@ -2733,6 +2718,26 @@ |
2733 | 2718 | } |
2734 | 2719 | |
2735 | 2720 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP |
2721 | + | |
2722 | +#if MAX_NUMNODES > 1 | |
2723 | +/* | |
2724 | + * Figure out the number of possible node ids. | |
2725 | + */ | |
2726 | +static void __init setup_nr_node_ids(void) | |
2727 | +{ | |
2728 | + unsigned int node; | |
2729 | + unsigned int highest = 0; | |
2730 | + | |
2731 | + for_each_node_mask(node, node_possible_map) | |
2732 | + highest = node; | |
2733 | + nr_node_ids = highest + 1; | |
2734 | +} | |
2735 | +#else | |
2736 | +static inline void setup_nr_node_ids(void) | |
2737 | +{ | |
2738 | +} | |
2739 | +#endif | |
2740 | + | |
2736 | 2741 | /** |
2737 | 2742 | * add_active_range - Register a range of PFNs backed by physical memory |
2738 | 2743 | * @nid: The node ID the range resides on |