Skip to content

Commit

Permalink
mm/memory_hotplug.c: remove unnecesary check from register_page_bootm…
Browse files Browse the repository at this point in the history
…em_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 <osalvador@techadventures.net>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
leberus authored and torvalds committed Feb 1, 2018
1 parent d6cb41c commit dc88c88
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit dc88c88

Please sign in to comment.