linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 2796/2998] drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node'
@ 2020-08-25 12:07 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-08-25 12:07 UTC (permalink / raw)
  To: Dan Williams; +Cc: kbuild-all, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 3414 bytes --]

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-a013-20200824 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        git checkout c36f93c29a94b01da6c400033a0cf6ec2d394579
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

>> arch/x86/mm/numa.c:907:5: warning: no previous prototype for 'phys_to_target_node' [-Wmissing-prototypes]
     907 | int phys_to_target_node(phys_addr_t start)
         |     ^~~~~~~~~~~~~~~~~~~
   arch/x86/mm/numa.c:921:5: warning: no previous prototype for 'memory_add_physaddr_to_nid' [-Wmissing-prototypes]
     921 | int memory_add_physaddr_to_nid(u64 start)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/nvdimm/e820.c: In function 'e820_register_one':
>> drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node' [-Werror=implicit-function-declaration]
      24 |  int nid = phys_to_target_node(res->start);
         |            ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c36f93c29a94b01da6c400033a0cf6ec2d394579
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c36f93c29a94b01da6c400033a0cf6ec2d394579
vim +/phys_to_target_node +24 drivers/nvdimm/e820.c

7a67832c7e44c2 Dan Williams 2015-08-19  19  
d76401ade0bb6a Dan Williams 2018-06-02  20  static int e820_register_one(struct resource *res, void *data)
d76401ade0bb6a Dan Williams 2018-06-02  21  {
d76401ade0bb6a Dan Williams 2018-06-02  22  	struct nd_region_desc ndr_desc;
d76401ade0bb6a Dan Williams 2018-06-02  23  	struct nvdimm_bus *nvdimm_bus = data;
7b27a8622f8027 Dan Williams 2020-02-16 @24  	int nid = phys_to_target_node(res->start);
d76401ade0bb6a Dan Williams 2018-06-02  25  
d76401ade0bb6a Dan Williams 2018-06-02  26  	memset(&ndr_desc, 0, sizeof(ndr_desc));
d76401ade0bb6a Dan Williams 2018-06-02  27  	ndr_desc.res = res;
7b27a8622f8027 Dan Williams 2020-02-16  28  	ndr_desc.numa_node = numa_map_to_online_node(nid);
7b27a8622f8027 Dan Williams 2020-02-16  29  	ndr_desc.target_node = nid;
d76401ade0bb6a Dan Williams 2018-06-02  30  	set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
d76401ade0bb6a Dan Williams 2018-06-02  31  	if (!nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc))
d76401ade0bb6a Dan Williams 2018-06-02  32  		return -ENXIO;
d76401ade0bb6a Dan Williams 2018-06-02  33  	return 0;
d76401ade0bb6a Dan Williams 2018-06-02  34  }
d76401ade0bb6a Dan Williams 2018-06-02  35  

:::::: The code at line 24 was first introduced by commit
:::::: 7b27a8622f802761d5c6abd6c37b22312a35343c libnvdimm/e820: Retrieve and populate correct 'target_node' info

:::::: TO: Dan Williams <dan.j.williams@intel.com>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41025 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-next:master 2796/2998] drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node'
  2020-08-25 13:42 kernel test robot
@ 2020-08-26  0:13 ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2020-08-26  0:13 UTC (permalink / raw)
  To: kernel test robot
  Cc: Dan Williams, kbuild-all, clang-built-linux,
	Linux Memory Management List

On Tue, 25 Aug 2020 21:42:38 +0800 kernel test robot <lkp@intel.com> 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 <lkp@intel.com>
> 
> 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
_



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [linux-next:master 2796/2998] drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node'
@ 2020-08-25 13:42 kernel test robot
  2020-08-26  0:13 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-08-25 13:42 UTC (permalink / raw)
  To: Dan Williams
  Cc: kbuild-all, clang-built-linux, Andrew Morton,
	Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]

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 <lkp@intel.com>

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.

# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c36f93c29a94b01da6c400033a0cf6ec2d394579
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c36f93c29a94b01da6c400033a0cf6ec2d394579
vim +/phys_to_target_node +24 drivers/nvdimm/e820.c

7a67832c7e44c2 Dan Williams 2015-08-19  19  
d76401ade0bb6a Dan Williams 2018-06-02  20  static int e820_register_one(struct resource *res, void *data)
d76401ade0bb6a Dan Williams 2018-06-02  21  {
d76401ade0bb6a Dan Williams 2018-06-02  22  	struct nd_region_desc ndr_desc;
d76401ade0bb6a Dan Williams 2018-06-02  23  	struct nvdimm_bus *nvdimm_bus = data;
7b27a8622f8027 Dan Williams 2020-02-16 @24  	int nid = phys_to_target_node(res->start);
d76401ade0bb6a Dan Williams 2018-06-02  25  
d76401ade0bb6a Dan Williams 2018-06-02  26  	memset(&ndr_desc, 0, sizeof(ndr_desc));
d76401ade0bb6a Dan Williams 2018-06-02  27  	ndr_desc.res = res;
7b27a8622f8027 Dan Williams 2020-02-16  28  	ndr_desc.numa_node = numa_map_to_online_node(nid);
7b27a8622f8027 Dan Williams 2020-02-16  29  	ndr_desc.target_node = nid;
d76401ade0bb6a Dan Williams 2018-06-02  30  	set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
d76401ade0bb6a Dan Williams 2018-06-02  31  	if (!nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc))
d76401ade0bb6a Dan Williams 2018-06-02  32  		return -ENXIO;
d76401ade0bb6a Dan Williams 2018-06-02  33  	return 0;
d76401ade0bb6a Dan Williams 2018-06-02  34  }
d76401ade0bb6a Dan Williams 2018-06-02  35  

:::::: The code at line 24 was first introduced by commit
:::::: 7b27a8622f802761d5c6abd6c37b22312a35343c libnvdimm/e820: Retrieve and populate correct 'target_node' info

:::::: TO: Dan Williams <dan.j.williams@intel.com>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36901 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-26  0:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 12:07 [linux-next:master 2796/2998] drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node' kernel test robot
2020-08-25 13:42 kernel test robot
2020-08-26  0:13 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).