From: Oscar Salvador Date: Thu, 1 Feb 2018 00:17:14 +0000 (-0800) Subject: mm/memory_hotplug.c: remove unnecesary check from register_page_bootmem_info_section() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=dc88c88904b8c5eb749874aecc278146b6ae02f3;p=openwrt%2Fstaging%2Fblogic.git mm/memory_hotplug.c: remove unnecesary check from register_page_bootmem_info_section() When we call register_page_bootmem_info_section() having CONFIG_SPARSEMEM_VMEMMAP enabled, we check if the pfn is valid. This check is redundant as we already checked this in register_page_bootmem_info_node() before calling register_page_bootmem_info_section(), so let's get rid of it. Link: http://lkml.kernel.org/r/20171205143422.GA31458@techadventures.net Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 999ce3af809d..9646e5d63648 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -200,9 +200,6 @@ static void register_page_bootmem_info_section(unsigned long start_pfn) struct mem_section *ms; struct page *page, *memmap; - if (!pfn_valid(start_pfn)) - return; - section_nr = pfn_to_section_nr(start_pfn); ms = __nr_to_section(section_nr);