diff options
author | Mike Travis <travis@sgi.com> | 2009-01-15 12:19:32 -0500 |
---|---|---|
committer | Mike Travis <travis@sgi.com> | 2009-01-15 12:19:32 -0500 |
commit | f2a082711905312dc7b6675e913fee0c4689f7ae (patch) | |
tree | ae8a9d2e0eaac2509b0df7ecda528b968ad24659 /arch/x86/include | |
parent | e46d51787e23a607cac5f593ac9926743a636dff (diff) |
x86: fix build warning when CONFIG_NUMA not defined.
Impact: fix build warning
The macro cpu_to_node did not reference it's argument, and instead
simply returned a 0. This causes a "unused variable" warning if
it's the only reference in a function (show_cache_disable).
Replace it with the more correct inline function.
Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/topology.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 4e2f2e0aab27..d0c68e291635 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -192,9 +192,20 @@ extern int __node_distance(int, int); | |||
192 | 192 | ||
193 | #else /* !CONFIG_NUMA */ | 193 | #else /* !CONFIG_NUMA */ |
194 | 194 | ||
195 | #define numa_node_id() 0 | 195 | static inline int numa_node_id(void) |
196 | #define cpu_to_node(cpu) 0 | 196 | { |
197 | #define early_cpu_to_node(cpu) 0 | 197 | return 0; |
198 | } | ||
199 | |||
200 | static inline int cpu_to_node(int cpu) | ||
201 | { | ||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | static inline int early_cpu_to_node(int cpu) | ||
206 | { | ||
207 | return 0; | ||
208 | } | ||
198 | 209 | ||
199 | static inline const cpumask_t *cpumask_of_node(int node) | 210 | static inline const cpumask_t *cpumask_of_node(int node) |
200 | { | 211 | { |