[PATCH] fold me "mm, memory_hotplug: get rid of is_zone_device_section"
From: Michal Hocko
Date: Mon Apr 10 2017 - 12:29:11 EST
- return 0 want_memblock == 0 from __add_section as per Jerome Glisse
---
mm/memory_hotplug.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 035165ceefef..9942d8937d0a 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -299,7 +299,8 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat)
}
#endif /* CONFIG_HAVE_BOOTMEM_INFO_NODE */
-static int __meminit __add_section(int nid, unsigned long phys_start_pfn, bool want_memblock)
+static int __meminit __add_section(int nid, unsigned long phys_start_pfn,
+ bool want_memblock)
{
int ret;
int i;
@@ -328,10 +329,10 @@ static int __meminit __add_section(int nid, unsigned long phys_start_pfn, bool w
SetPageReserved(page);
}
- if (want_memblock)
- ret = register_new_memory(nid, __pfn_to_section(phys_start_pfn));
+ if (!want_memblock)
+ return 0
- return ret;
+ return register_new_memory(nid, __pfn_to_section(phys_start_pfn));
}
/*
--
2.11.0
--
Michal Hocko
SUSE Labs