Skip to content

Commit 1040490

Browse files
qiwuchentorvalds
authored andcommitted
mm/memory_hotplug.c: use __pfn_to_section() instead of open-coding
Use __pfn_to_section() API instead of open-coding for better code readability. Signed-off-by: chenqiwu <chenqiwu@xiaomi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: David Hildenbrand <david@redhat.com> Link: http://lkml.kernel.org/r/1584345134-16671-1-git-send-email-qiwuchen55@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5f47adf commit 1040490

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memory_hotplug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static void __remove_section(unsigned long pfn, unsigned long nr_pages,
495495
unsigned long map_offset,
496496
struct vmem_altmap *altmap)
497497
{
498-
struct mem_section *ms = __nr_to_section(pfn_to_section_nr(pfn));
498+
struct mem_section *ms = __pfn_to_section(pfn);
499499

500500
if (WARN_ON_ONCE(!valid_section(ms)))
501501
return;

0 commit comments

Comments
 (0)