]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: fix compile warning section mismatch in find_node()
authorThomas Tai <thomas.tai@oracle.com>
Fri, 11 Nov 2016 15:46:10 +0000 (10:46 -0500)
committerAllen Pais <allen.pais@oracle.com>
Sun, 22 Jan 2017 15:37:14 +0000 (21:07 +0530)
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>
arch/sparc/mm/init_64.c

index 2fde60da480a074076fca1eb6e1d7f80b01b487b..2824f67107e94768cae3a43d2b441710bd6185f4 100644 (file)
@@ -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;