Commit 6e259e7dc482d4d5e2701259ddc85ffebd957502

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent 3ac38faa1f

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>

Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff

... ... @@ -7,6 +7,7 @@
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>
... ... @@ -683,8 +684,11 @@
683 684  
684 685 ret = subsys_system_register(&node_subsys, cpu_root_attr_groups);
685 686 if (!ret) {
686   - hotplug_memory_notifier(node_memory_callback,
687   - NODE_CALLBACK_PRI);
  687 + static struct notifier_block node_memory_callback_nb = {
  688 + .notifier_call = node_memory_callback,
  689 + .priority = NODE_CALLBACK_PRI,
  690 + };
  691 + register_hotmemory_notifier(&node_memory_callback_nb);
688 692 }
689 693  
690 694 /*