diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-05-16 17:26:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-18 22:01:35 -0400 |
commit | 48d372164d1943a0d32d44ca43640a5f24fef979 (patch) | |
tree | f44f4feaf7561e74ca14b2d6b992a9c2347d7a31 /arch | |
parent | b6abce1fa8a75e4951e06400cdf48dcad6527ced (diff) |
sparc64: fix sparse warnings in int_64.c
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/mm/init_64.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 0ebe2fde6671..6dfad56f39a8 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -795,11 +795,11 @@ struct node_mem_mask { | |||
795 | static struct node_mem_mask node_masks[MAX_NUMNODES]; | 795 | static struct node_mem_mask node_masks[MAX_NUMNODES]; |
796 | static int num_node_masks; | 796 | static int num_node_masks; |
797 | 797 | ||
798 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
799 | |||
798 | int numa_cpu_lookup_table[NR_CPUS]; | 800 | int numa_cpu_lookup_table[NR_CPUS]; |
799 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; | 801 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; |
800 | 802 | ||
801 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
802 | |||
803 | struct mdesc_mblock { | 803 | struct mdesc_mblock { |
804 | u64 base; | 804 | u64 base; |
805 | u64 size; | 805 | u64 size; |
@@ -888,17 +888,21 @@ static void __init allocate_node_data(int nid) | |||
888 | 888 | ||
889 | static void init_node_masks_nonnuma(void) | 889 | static void init_node_masks_nonnuma(void) |
890 | { | 890 | { |
891 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
891 | int i; | 892 | int i; |
893 | #endif | ||
892 | 894 | ||
893 | numadbg("Initializing tables for non-numa.\n"); | 895 | numadbg("Initializing tables for non-numa.\n"); |
894 | 896 | ||
895 | node_masks[0].mask = node_masks[0].val = 0; | 897 | node_masks[0].mask = node_masks[0].val = 0; |
896 | num_node_masks = 1; | 898 | num_node_masks = 1; |
897 | 899 | ||
900 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
898 | for (i = 0; i < NR_CPUS; i++) | 901 | for (i = 0; i < NR_CPUS; i++) |
899 | numa_cpu_lookup_table[i] = 0; | 902 | numa_cpu_lookup_table[i] = 0; |
900 | 903 | ||
901 | cpumask_setall(&numa_cpumask_lookup_table[0]); | 904 | cpumask_setall(&numa_cpumask_lookup_table[0]); |
905 | #endif | ||
902 | } | 906 | } |
903 | 907 | ||
904 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 908 | #ifdef CONFIG_NEED_MULTIPLE_NODES |