Skip to content

Commit

Permalink
sparc64: fix compile warning section mismatch in find_node()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
thomastaioracle authored and davem330 committed Nov 14, 2016
1 parent 07b5ab3 commit 87a349f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/sparc/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ static int num_mblocks;
static int find_numa_node_for_addr(unsigned long pa,
struct node_mem_mask *pnode_mask);

static unsigned long ra_to_pa(unsigned long addr)
static unsigned long __init ra_to_pa(unsigned long addr)
{
int i;

Expand All @@ -821,7 +821,7 @@ static unsigned long ra_to_pa(unsigned long addr)
return addr;
}

static int find_node(unsigned long addr)
static int __init find_node(unsigned long addr)
{
static bool search_mdesc = true;
static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL };
Expand Down Expand Up @@ -858,7 +858,7 @@ static int find_node(unsigned long addr)
return last_index;
}

static u64 memblock_nid_range(u64 start, u64 end, int *nid)
static u64 __init memblock_nid_range(u64 start, u64 end, int *nid)
{
*nid = find_node(start);
start += PAGE_SIZE;
Expand Down

0 comments on commit 87a349f

Please sign in to comment.