Skip to content
Commit c1cbc3ee authored by Wei Yang's avatar Wei Yang Committed by Linus Torvalds
Browse files

mm/sparse.c: use __nr_to_section(section_nr) to get mem_section



__pfn_to_section is defined as __nr_to_section(pfn_to_section_nr(pfn)).

Since we already get section_nr, it is not necessary to get mem_section
from start_pfn. By doing so, we reduce one redundant operation.

Link: http://lkml.kernel.org/r/20190809010242.29797-1-richardw.yang@linux.intel.com
Signed-off-by: default avatarWei Yang <richardw.yang@linux.intel.com>
Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Tested-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent db57e98d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment