From: Thomas Tai Date: Fri, 11 Nov 2016 15:46:10 +0000 (-0500) Subject: sparc64: fix compile warning section mismatch in find_node() X-Git-Tag: v4.1.12-92~12^2~12 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=aab93ab50d3c0cf37e88f2b7ef3e16228b57c02f;p=users%2Fjedix%2Flinux-maple.git 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. Orabug: 24674753 Signed-off-by: Thomas Tai (cherry picked from commit e58d08f923190fc4dc2a1962710f84672c2bc9b2) Signed-off-by: Allen Pais --- diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 2fde60da480a0..2824f67107e94 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -1170,7 +1170,7 @@ struct mdesc_mblock { 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; @@ -1186,7 +1186,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) { int i; @@ -1203,7 +1203,7 @@ static int find_node(unsigned long addr) 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;