From 4558c652ccf025ba50f1dfb67840df3ce977b347 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Feb 2013 13:14:20 +1100 Subject: [PATCH] memory-hotplug-do-not-allocate-pdgat-if-it-was-not-freed-when-offline-fix-fix fix the warning again again Tested-by: Wu Fengguang Cc: Tang Chen Signed-off-by: Andrew Morton --- mm/memory_hotplug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index c806abd78d0e..559e4409cf90 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1089,7 +1089,10 @@ int __ref add_memory(int nid, u64 start, u64 size) if (!res) goto out; - new_pgdat = (NODE_DATA(nid) == NULL); + { /* Stupid hack to suppress address-never-null warning */ + void *p = NODE_DATA(nid); + new_pgdat = !p; + } new_node = !node_online(nid); if (new_node) { pgdat = hotadd_new_pgdat(nid, start); -- 2.39.5