* Re: [PATCH v2 2/3] mm,memory_hotplug: Implement numa node notifier
[not found] <20250408084153.255762-3-osalvador@suse.de>
@ 2025-04-09 13:44 ` kernel test robot
2025-04-09 16:58 ` Oscar Salvador
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-04-09 13:44 UTC (permalink / raw)
To: Oscar Salvador, Andrew Morton
Cc: llvm, oe-kbuild-all, Linux Memory Management List,
David Hildenbrand, linux-kernel, Vlastimil Babka, Harry Yoo,
Jonathan Cameron, linux-cxl, Oscar Salvador
Hi Oscar,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on next-20250409]
[cannot apply to rafael-pm/linux-next rafael-pm/bleeding-edge driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus tj-cgroup/for-next linus/master vbabka-slab/for-next v6.15-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Oscar-Salvador/mm-slub-Do-not-special-case-N_NORMAL-nodes-for-slab_nodes/20250408-164417
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250408084153.255762-3-osalvador%40suse.de
patch subject: [PATCH v2 2/3] mm,memory_hotplug: Implement numa node notifier
config: arm64-randconfig-001-20250409 (https://download.01.org/0day-ci/archive/20250409/202504092104.MyHeSV43-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250409/202504092104.MyHeSV43-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504092104.MyHeSV43-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/base/node.c:115:5: error: redefinition of 'register_node_notifier'
115 | int register_node_notifier(struct notifier_block *nb)
| ^
include/linux/memory.h:172:19: note: previous definition is here
172 | static inline int register_node_notifier(struct notifier_block *nb)
| ^
>> drivers/base/node.c:121:6: error: redefinition of 'unregister_node_notifier'
121 | void unregister_node_notifier(struct notifier_block *nb)
| ^
include/linux/memory.h:176:20: note: previous definition is here
176 | static inline void unregister_node_notifier(struct notifier_block *nb)
| ^
>> drivers/base/node.c:127:5: error: redefinition of 'node_notify'
127 | int node_notify(unsigned long val, void *v)
| ^
include/linux/memory.h:179:19: note: previous definition is here
179 | static inline int node_notify(unsigned long val, void *v)
| ^
3 errors generated.
vim +/register_node_notifier +115 drivers/base/node.c
114
> 115 int register_node_notifier(struct notifier_block *nb)
116 {
117 return blocking_notifier_chain_register(&node_chain, nb);
118 }
119 EXPORT_SYMBOL(register_node_notifier);
120
> 121 void unregister_node_notifier(struct notifier_block *nb)
122 {
123 blocking_notifier_chain_unregister(&node_chain, nb);
124 }
125 EXPORT_SYMBOL(unregister_node_notifier);
126
> 127 int node_notify(unsigned long val, void *v)
128 {
129 return blocking_notifier_call_chain(&node_chain, val, v);
130 }
131
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/3] mm,memory_hotplug: Implement numa node notifier
2025-04-09 13:44 ` [PATCH v2 2/3] mm,memory_hotplug: Implement numa node notifier kernel test robot
@ 2025-04-09 16:58 ` Oscar Salvador
0 siblings, 0 replies; 2+ messages in thread
From: Oscar Salvador @ 2025-04-09 16:58 UTC (permalink / raw)
To: kernel test robot
Cc: Andrew Morton, llvm, oe-kbuild-all, Linux Memory Management List,
David Hildenbrand, linux-kernel, Vlastimil Babka, Harry Yoo,
Jonathan Cameron, linux-cxl
On Wed, Apr 09, 2025 at 09:44:52PM +0800, kernel test robot wrote:
> Hi Oscar,
>
> kernel test robot noticed the following build errors:
...
> >> drivers/base/node.c:115:5: error: redefinition of 'register_node_notifier'
> 115 | int register_node_notifier(struct notifier_block *nb)
> | ^
> include/linux/memory.h:172:19: note: previous definition is here
> 172 | static inline int register_node_notifier(struct notifier_block *nb)
> | ^
> >> drivers/base/node.c:121:6: error: redefinition of 'unregister_node_notifier'
> 121 | void unregister_node_notifier(struct notifier_block *nb)
> | ^
> include/linux/memory.h:176:20: note: previous definition is here
> 176 | static inline void unregister_node_notifier(struct notifier_block *nb)
> | ^
> >> drivers/base/node.c:127:5: error: redefinition of 'node_notify'
> 127 | int node_notify(unsigned long val, void *v)
> | ^
> include/linux/memory.h:179:19: note: previous definition is here
> 179 | static inline int node_notify(unsigned long val, void *v)
> | ^
> 3 errors generated.
Ah, I see. When CONFIG_MEMORY_HOTPLUG=n those come into play.
That is not a problem for the memory-notify thing because drivers/base/memory.c
gets compiled IFF CONFIG_MEMORY_HOTPLUG=y.
I am thinking two ways to fix this:
1) Move the code for node-notify to drivers/base/memory.c
2) Surround those functions within a
#ifdef CONFIG_MEMORY_HOTPLUG
...
#endif
Thoughts? I lean towards option #2 as it looks cleaner to me:
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 182c71dfb5b8..3b084d71888a 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -110,6 +110,7 @@ static const struct attribute_group *node_access_node_groups[] = {
NULL,
};
+#ifdef CONFIG_MEMORY_HOTPLUG
static BLOCKING_NOTIFIER_HEAD(node_chain);
int register_node_notifier(struct notifier_block *nb)
@@ -128,6 +129,7 @@ int node_notify(unsigned long val, void *v)
{
return blocking_notifier_call_chain(&node_chain, val, v);
}
+#endif
static void node_remove_accesses(struct node *node)
{
--
Oscar Salvador
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-09 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250408084153.255762-3-osalvador@suse.de>
2025-04-09 13:44 ` [PATCH v2 2/3] mm,memory_hotplug: Implement numa node notifier kernel test robot
2025-04-09 16:58 ` Oscar Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox