aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tai <thomas.tai@oracle.com>2016-11-11 19:41:00 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-14 13:40:46 -0500
commit87a349f9cc0908bc0cfac0c9ece3179f650ae95a (patch)
tree9a93c1f2bdf4f5395599cf9ed2d3fe8f37ff5a75
parent07b5ab3f71d318e52c18cc3b73c1d44c908aacfa (diff)
sparc64: fix compile warning section mismatch in find_node()
A compile warning is introduced by a commit to fix the find_node(). This patch fix the compile warning by moving find_node() into __init section. Because find_node() is only used by memblock_nid_range() which is only used by a __init add_node_ranges(). find_node() and memblock_nid_range() should also be inside __init section. Signed-off-by: Thomas Tai <thomas.tai@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/mm/init_64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 068eb3dcbcb5..37aa537b3ad8 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -805,7 +805,7 @@ static int num_mblocks;
805static int find_numa_node_for_addr(unsigned long pa, 805static int find_numa_node_for_addr(unsigned long pa,
806 struct node_mem_mask *pnode_mask); 806 struct node_mem_mask *pnode_mask);
807 807
808static unsigned long ra_to_pa(unsigned long addr) 808static unsigned long __init ra_to_pa(unsigned long addr)
809{ 809{
810 int i; 810 int i;
811 811
@@ -821,7 +821,7 @@ static unsigned long ra_to_pa(unsigned long addr)
821 return addr; 821 return addr;
822} 822}
823 823
824static int find_node(unsigned long addr) 824static int __init find_node(unsigned long addr)
825{ 825{
826 static bool search_mdesc = true; 826 static bool search_mdesc = true;
827 static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL }; 827 static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL };
@@ -858,7 +858,7 @@ static int find_node(unsigned long addr)
858 return last_index; 858 return last_index;
859} 859}
860 860
861static u64 memblock_nid_range(u64 start, u64 end, int *nid) 861static u64 __init memblock_nid_range(u64 start, u64 end, int *nid)
862{ 862{
863 *nid = find_node(start); 863 *nid = find_node(start);
864 start += PAGE_SIZE; 864 start += PAGE_SIZE;