From mboxrd@z Thu Jan 1 00:00:00 1970 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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,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 3E8F6C433E1 for ; Wed, 26 Aug 2020 00:14:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F383820707 for ; Wed, 26 Aug 2020 00:14:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="YXbk/ZBu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F383820707 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A2E9E8E0003; Tue, 25 Aug 2020 20:14:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A053D6B0007; Tue, 25 Aug 2020 20:14:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F5A38E0003; Tue, 25 Aug 2020 20:14:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id 7BEF16B0006 for ; Tue, 25 Aug 2020 20:14:00 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 408352C84 for ; Wed, 26 Aug 2020 00:14:00 +0000 (UTC) X-FDA: 77190797040.14.shelf22_1e0cac627060 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 0E64518229818 for ; Wed, 26 Aug 2020 00:14:00 +0000 (UTC) X-HE-Tag: shelf22_1e0cac627060 X-Filterd-Recvd-Size: 4366 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Wed, 26 Aug 2020 00:13:59 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 764FB20707; Wed, 26 Aug 2020 00:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598400838; bh=YHc82PrXXIMWROCs8a52vU20+4N/xOgpAzfqrDJiXMA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YXbk/ZBuN/q5lBcRXO8qlzZS/fOLys7GThWRmiKf31k1InpA/VVdXGfVwnL/TwMPa cCqEp147w5SrhR9vnyC2CaVbHtQG1Fsrg9UhcRtQI76nESjXjOuIvNJuiP4s+2ogyN xU6aftOF9ZzszDqr8zzyO7iltbumVUJGO0BczYwU= Date: Tue, 25 Aug 2020 17:13:58 -0700 From: Andrew Morton To: kernel test robot Cc: Dan Williams , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List Subject: Re: [linux-next:master 2796/2998] drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node' Message-Id: <20200825171358.3929899ac60bc7354e97f68e@linux-foundation.org> In-Reply-To: <202008252130.7YrHIyMI%lkp@intel.com> References: <202008252130.7YrHIyMI%lkp@intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0E64518229818 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: On Tue, 25 Aug 2020 21:42:38 +0800 kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63 > commit: c36f93c29a94b01da6c400033a0cf6ec2d394579 [2796/2998] mm/memory_hotplug: introduce default phys_to_target_node() implementation > config: x86_64-randconfig-a011-20200825 (attached as .config) > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 77e5a195f818b9ace91f7b12ab948b21d7918238) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install x86_64 cross compiling tool for clang build > # apt-get install binutils-x86-64-linux-gnu > git checkout c36f93c29a94b01da6c400033a0cf6ec2d394579 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > > >> drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node' [-Werror,-Wimplicit-function-declaration] > int nid = phys_to_target_node(res->start); > ^ > 1 error generated. Let's move the definitions outside CONFIG_MEMORY_HOTPLUG. --- a/include/linux/memory_hotplug.h~mm-memory_hotplug-introduce-default-phys_to_target_node-implementation-fix +++ a/include/linux/memory_hotplug.h @@ -149,20 +149,6 @@ int add_pages(int nid, unsigned long sta struct mhp_params *params); #endif /* ARCH_HAS_ADD_PAGES */ -#ifdef CONFIG_NUMA -extern int memory_add_physaddr_to_nid(u64 start); -extern int phys_to_target_node(u64 start); -#else -static inline int memory_add_physaddr_to_nid(u64 start) -{ - return 0; -} -static inline int phys_to_target_node(u64 start) -{ - return 0; -} -#endif - #ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION /* * For supporting node-hotadd, we have to allocate a new pgdat. @@ -289,6 +275,20 @@ static inline bool movable_node_is_enabl } #endif /* ! CONFIG_MEMORY_HOTPLUG */ +#ifdef CONFIG_NUMA +extern int memory_add_physaddr_to_nid(u64 start); +extern int phys_to_target_node(u64 start); +#else +static inline int memory_add_physaddr_to_nid(u64 start) +{ + return 0; +} +static inline int phys_to_target_node(u64 start) +{ + return 0; +} +#endif + #if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_DEFERRED_STRUCT_PAGE_INIT) /* * pgdat resizing functions _