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.
Orabug:
24674753
Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
(cherry picked from commit
e58d08f923190fc4dc2a1962710f84672c2bc9b2)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
static struct mdesc_mblock *mblocks;
static int num_mblocks;
-static unsigned long ra_to_pa(unsigned long addr)
+static unsigned long __init ra_to_pa(unsigned long addr)
{
int i;
return addr;
}
-static int find_node(unsigned long addr)
+static int __init find_node(unsigned long addr)
{
int i;
return 0;
}
-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;