Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/base/node.c: switch to register_hotmemory_notifier()

Squishes a warning which my change to hotplug_memory_notifier() added.

I want to keep that warning, because it is punishment for failnig to check
the hotplug_memory_notifier() return value.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
6e259e7d 3ac38faa

+6 -2
+6 -2
drivers/base/node.c
··· 7 7 #include <linux/mm.h> 8 8 #include <linux/memory.h> 9 9 #include <linux/vmstat.h> 10 + #include <linux/notifier.h> 10 11 #include <linux/node.h> 11 12 #include <linux/hugetlb.h> 12 13 #include <linux/compaction.h> ··· 684 683 685 684 ret = subsys_system_register(&node_subsys, cpu_root_attr_groups); 686 685 if (!ret) { 687 - hotplug_memory_notifier(node_memory_callback, 688 - NODE_CALLBACK_PRI); 686 + static struct notifier_block node_memory_callback_nb = { 687 + .notifier_call = node_memory_callback, 688 + .priority = NODE_CALLBACK_PRI, 689 + }; 690 + register_hotmemory_notifier(&node_memory_callback_nb); 689 691 } 690 692 691 693 /*