Commit 899b6053 authored by Thomas Tai's avatar Thomas Tai Committed by Greg Kroah-Hartman

sparc64: fix compile warning section mismatch in find_node()

[ Upstream commit 87a349f9 ]

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: default avatarThomas Tai <thomas.tai@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed7b60db
...@@ -803,7 +803,7 @@ static int num_mblocks; ...@@ -803,7 +803,7 @@ static int num_mblocks;
static int find_numa_node_for_addr(unsigned long pa, static int find_numa_node_for_addr(unsigned long pa,
struct node_mem_mask *pnode_mask); 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; int i;
...@@ -819,7 +819,7 @@ static unsigned long ra_to_pa(unsigned long addr) ...@@ -819,7 +819,7 @@ static unsigned long ra_to_pa(unsigned long addr)
return addr; return addr;
} }
static int find_node(unsigned long addr) static int __init find_node(unsigned long addr)
{ {
static bool search_mdesc = true; static bool search_mdesc = true;
static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL }; static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL };
...@@ -856,7 +856,7 @@ static int find_node(unsigned long addr) ...@@ -856,7 +856,7 @@ static int find_node(unsigned long addr)
return last_index; 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); *nid = find_node(start);
start += PAGE_SIZE; start += PAGE_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment