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>
This commit is contained in:
@@ -192,9 +192,20 @@ extern int __node_distance(int, int);
|
|||||||
|
|
||||||
#else /* !CONFIG_NUMA */
|
#else /* !CONFIG_NUMA */
|
||||||
|
|
||||||
#define numa_node_id() 0
|
static inline int numa_node_id(void)
|
||||||
#define cpu_to_node(cpu) 0
|
{
|
||||||
#define early_cpu_to_node(cpu) 0
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int cpu_to_node(int cpu)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int early_cpu_to_node(int cpu)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline const cpumask_t *cpumask_of_node(int node)
|
static inline const cpumask_t *cpumask_of_node(int node)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user