Skip to content

Commit 87a349f

Browse files
thomastaioracledavem330
authored andcommitted
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>
1 parent 07b5ab3 commit 87a349f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/sparc/mm/init_64.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ static int num_mblocks;
805805
static int find_numa_node_for_addr(unsigned long pa,
806806
struct node_mem_mask *pnode_mask);
807807

808-
static unsigned long ra_to_pa(unsigned long addr)
808+
static unsigned long __init ra_to_pa(unsigned long addr)
809809
{
810810
int i;
811811

@@ -821,7 +821,7 @@ static unsigned long ra_to_pa(unsigned long addr)
821821
return addr;
822822
}
823823

824-
static int find_node(unsigned long addr)
824+
static int __init find_node(unsigned long addr)
825825
{
826826
static bool search_mdesc = true;
827827
static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL };
@@ -858,7 +858,7 @@ static int find_node(unsigned long addr)
858858
return last_index;
859859
}
860860

861-
static u64 memblock_nid_range(u64 start, u64 end, int *nid)
861+
static u64 __init memblock_nid_range(u64 start, u64 end, int *nid)
862862
{
863863
*nid = find_node(start);
864864
start += PAGE_SIZE;

0 commit comments

Comments
 (0)