Re: [PATCH v3 06/23] mm/memory_hotplug: Introduce default phys_to_target_node() implementation

kernel test robot
2020-08-01T16:40:38Z

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

Hi Dan,

I love your patch! Yet something to improve:

[auto build test ERROR on 01830e6c042e8eb6eb202e05d7df8057135b4c26]

url: https://github.com/0day-ci/linux/commits/Dan-Williams/device-dax-Support-sub-dividing-soft-reserved-ranges/20200801-114823
base: 01830e6c042e8eb6eb202e05d7df8057135b4c26
config: x86_64-randconfig-a012-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# 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 errors (new ones prefixed by >>):

In file included from include/linux/mmzone.h:813,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
>> include/linux/memory_hotplug.h:160:19: error: redefinition of 'phys_to_target_node'
160 | static inline int phys_to_target_node(u64 start)
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:14,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/numa.h:38:19: note: previous definition of 'phys_to_target_node' was here
38 | static inline int phys_to_target_node(phys_addr_t addr)
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:114: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1197: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.

vim +/phys_to_target_node +160 include/linux/memory_hotplug.h

151
152 #ifdef CONFIG_NUMA
153 extern int memory_add_physaddr_to_nid(u64 start);
154 extern int phys_to_target_node(u64 start);
155 #else
156 static inline int memory_add_physaddr_to_nid(u64 start)
157 {
158 return 0;
159 }
> 160 static inline int phys_to_target_node(u64 start)
161 {
162 return 0;
163 }
164 #endif
165

---
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: 32484 bytes --]