Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934258AbcLIQSv (ORCPT ); Fri, 9 Dec 2016 11:18:51 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55436 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934227AbcLIQSt (ORCPT ); Fri, 9 Dec 2016 11:18:49 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Tai , "David S. Miller" Subject: [PATCH 4.4 22/28] sparc64: fix compile warning section mismatch in find_node() Date: Fri, 9 Dec 2016 17:18:04 +0100 Message-Id: <20161209161748.861002231@linuxfoundation.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161209161747.923205441@linuxfoundation.org> References: <20161209161747.923205441@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1657 Lines: 52 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Tai [ 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- arch/sparc/mm/init_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -803,7 +803,7 @@ static int num_mblocks; static int find_numa_node_for_addr(unsigned long pa, 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; @@ -819,7 +819,7 @@ static unsigned long ra_to_pa(unsigned l return addr; } -static int find_node(unsigned long addr) +static int __init find_node(unsigned long addr) { static bool search_mdesc = true; static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL }; @@ -856,7 +856,7 @@ static int find_node(unsigned long addr) 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); start += PAGE_SIZE;