From patchwork Tue Nov 17 03:31:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11911409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81884C388F9 for ; Tue, 17 Nov 2020 03:31:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F00BE2463B for ; Tue, 17 Nov 2020 03:31:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F00BE2463B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D17B16B00A4; Mon, 16 Nov 2020 22:31:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CC7766B00A5; Mon, 16 Nov 2020 22:31:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDD836B00A6; Mon, 16 Nov 2020 22:31:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id 8BCD76B00A4 for ; Mon, 16 Nov 2020 22:31:07 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 39A333626 for ; Tue, 17 Nov 2020 03:31:07 +0000 (UTC) X-FDA: 77492484174.07.linen54_350487a2732e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 1C9461803F9A9 for ; Tue, 17 Nov 2020 03:31:07 +0000 (UTC) X-HE-Tag: linen54_350487a2732e X-Filterd-Recvd-Size: 3993 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Nov 2020 03:31:06 +0000 (UTC) IronPort-SDR: gnDWcIK6LmM7A2APnKXr952ehZWCRzQQ9mh691be0b6h0YOYvVbnP3kZQiEyTwC+6frFp9Kcdu qt+3bmu7aYwA== X-IronPort-AV: E=McAfee;i="6000,8403,9807"; a="255568021" X-IronPort-AV: E=Sophos;i="5.77,484,1596524400"; d="scan'208";a="255568021" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 19:31:02 -0800 IronPort-SDR: 3ENWXY+KFD7MxWwBNknTO9Qrr6zKnSo++U65VmUk4A9mNnnY6bZuAOkO4wcHChQ6jNNkznLh1s yP585H2WMapQ== X-IronPort-AV: E=Sophos;i="5.77,484,1596524400"; d="scan'208";a="475769777" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.25]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 19:31:02 -0800 Subject: [PATCH] powerpc: fix create_section_mapping compile warning From: Dan Williams To: akpm@linux-foundation.org Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , kernel test robot , linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 16 Nov 2020 19:31:01 -0800 Message-ID: <160558386174.2948926.2740149041249041764.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 0day robot reports that a recent rework of how memory_add_physaddr_to_nid() and phys_to_target_node() are declared resulted in the following new compilation warning: arch/powerpc/mm/mem.c:91:12: warning: no previous prototype for 'create_section_mapping' [-Wmissing-prototypes] 91 | int __weak create_section_mapping(unsigned long start, unsigned long end, | ^~~~~~~~~~~~~~~~~~~~~~ ...fix this by moving the declaration of create_section_mapping() outside of the CONFIG_NEED_MULTIPLE_NODES ifdef guard, and include an explicit include of asm/mmzone.h in mem.c. An include of linux/mmzone.h is not sufficient. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Andrew Morton Reported-by: kernel test robot Signed-off-by: Dan Williams --- arch/powerpc/include/asm/mmzone.h | 7 +++++-- arch/powerpc/mm/mem.c | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h index 177fd18caf83..6cda76b57c5d 100644 --- a/arch/powerpc/include/asm/mmzone.h +++ b/arch/powerpc/include/asm/mmzone.h @@ -33,8 +33,6 @@ extern struct pglist_data *node_data[]; extern int numa_cpu_lookup_table[]; extern cpumask_var_t node_to_cpumask_map[]; #ifdef CONFIG_MEMORY_HOTPLUG -extern int create_section_mapping(unsigned long start, unsigned long end, - int nid, pgprot_t prot); extern unsigned long max_pfn; u64 memory_hotplug_max(void); #else @@ -48,5 +46,10 @@ u64 memory_hotplug_max(void); #define __HAVE_ARCH_RESERVED_KERNEL_PAGES #endif +#ifdef CONFIG_MEMORY_HOTPLUG +extern int create_section_mapping(unsigned long start, unsigned long end, + int nid, pgprot_t prot); +#endif + #endif /* __KERNEL__ */ #endif /* _ASM_MMZONE_H_ */ diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 01ec2a252f09..3fc325bebe4d 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -50,6 +50,7 @@ #include #include #include +#include #include