sparc64: fix sparse warnings in int_64.c
authorSam Ravnborg <sam@ravnborg.org>
Fri, 16 May 2014 21:26:12 +0000 (23:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 May 2014 02:01:35 +0000 (19:01 -0700)
Fix following warnings:
init_64.c:798:5: warning: symbol 'numa_cpu_lookup_table' was not declared. Should it be static?
init_64.c:799:11: warning: symbol 'numa_cpumask_lookup_table' was not declared. Should it be static?

The warnings were present with an allnoconfig
Fix so the variables are only declared if CONFIG_NEED_MULTIPLE_NODES is defined.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/init_64.c

index 0ebe2fde667101455a394ccf0a512bcaed2e24b0..6dfad56f39a81d229a6c3cf1c211fff04a297cc9 100644 (file)
@@ -795,11 +795,11 @@ struct node_mem_mask {
 static struct node_mem_mask node_masks[MAX_NUMNODES];
 static int num_node_masks;
 
+#ifdef CONFIG_NEED_MULTIPLE_NODES
+
 int numa_cpu_lookup_table[NR_CPUS];
 cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES];
 
-#ifdef CONFIG_NEED_MULTIPLE_NODES
-
 struct mdesc_mblock {
        u64     base;
        u64     size;
@@ -888,17 +888,21 @@ static void __init allocate_node_data(int nid)
 
 static void init_node_masks_nonnuma(void)
 {
+#ifdef CONFIG_NEED_MULTIPLE_NODES
        int i;
+#endif
 
        numadbg("Initializing tables for non-numa.\n");
 
        node_masks[0].mask = node_masks[0].val = 0;
        num_node_masks = 1;
 
+#ifdef CONFIG_NEED_MULTIPLE_NODES
        for (i = 0; i < NR_CPUS; i++)
                numa_cpu_lookup_table[i] = 0;
 
        cpumask_setall(&numa_cpumask_lookup_table[0]);
+#endif
 }
 
 #ifdef CONFIG_NEED_MULTIPLE_NODES