Skip to content

Commit 899b605

Browse files
thomastaioraclegregkh
authored andcommitted
sparc64: fix compile warning section mismatch in find_node()
[ Upstream commit 87a349f9cc0908bc0cfac0c9ece3179f650ae95a ] 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 <thomas.tai@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ed7b60d commit 899b605

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/sparc/mm/init_64.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ static int num_mblocks;
803803
static int find_numa_node_for_addr(unsigned long pa,
804804
struct node_mem_mask *pnode_mask);
805805

806-
static unsigned long ra_to_pa(unsigned long addr)
806+
static unsigned long __init ra_to_pa(unsigned long addr)
807807
{
808808
int i;
809809

@@ -819,7 +819,7 @@ static unsigned long ra_to_pa(unsigned long addr)
819819
return addr;
820820
}
821821

822-
static int find_node(unsigned long addr)
822+
static int __init find_node(unsigned long addr)
823823
{
824824
static bool search_mdesc = true;
825825
static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL };
@@ -856,7 +856,7 @@ static int find_node(unsigned long addr)
856856
return last_index;
857857
}
858858

859-
static u64 memblock_nid_range(u64 start, u64 end, int *nid)
859+
static u64 __init memblock_nid_range(u64 start, u64 end, int *nid)
860860
{
861861
*nid = find_node(start);
862862
start += PAGE_SIZE;

0 commit comments

Comments
 (0)