memory hotplug: fix warnings
authorVincent Stehlé <vincent.stehle@laposte.net>
Tue, 30 Apr 2013 22:26:45 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 May 2013 00:04:00 +0000 (17:04 -0700)
Fix the following compilation warnings:

  mm/slab.c: In function `kmem_cache_init_late':
  mm/slab.c:1778:2: warning: statement with no effect [-Wunused-value]

  mm/page_cgroup.c: In function `page_cgroup_init':
  mm/page_cgroup.c:305:2: warning: statement with no effect [-Wunused-value]

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memory.h

index 73817af8b480e026d456019ef344bb323e9697f9..85c31a8e290459c6f3d89fd517ccb2e6d748f095 100644 (file)
@@ -137,7 +137,7 @@ enum mem_add_context { BOOT, HOTPLUG };
 #define register_hotmemory_notifier(nb)                register_memory_notifier(nb)
 #define unregister_hotmemory_notifier(nb)      unregister_memory_notifier(nb)
 #else
-#define hotplug_memory_notifier(fn, pri)       (0)
+#define hotplug_memory_notifier(fn, pri)       ({ 0; })
 /* These aren't inline functions due to a GCC bug. */
 #define register_hotmemory_notifier(nb)    ({ (void)(nb); 0; })
 #define unregister_hotmemory_notifier(nb)  ({ (void)(nb); })