summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorchenqiwu <chenqiwu@xiaomi.com>2020-04-06 20:07:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-07 10:43:41 -0700
commit104049017b774036fa971722a202a17e6585a200 (patch)
tree91d3b1e6a839b05fe1e7c406d63f98b51989d030 /mm
parent5f47adf762b78cae97de58d9ff01d2d44db09467 (diff)
downloadlinux-104049017b774036fa971722a202a17e6585a200.tar.gz
linux-104049017b774036fa971722a202a17e6585a200.tar.bz2
linux-104049017b774036fa971722a202a17e6585a200.zip
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>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory_hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 2fb78c5ebaf3..635e8e286598 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -495,7 +495,7 @@ static void __remove_section(unsigned long pfn, unsigned long nr_pages,
unsigned long map_offset,
struct vmem_altmap *altmap)
{
- struct mem_section *ms = __nr_to_section(pfn_to_section_nr(pfn));
+ struct mem_section *ms = __pfn_to_section(pfn);
if (WARN_ON_ONCE(!valid_section(ms)))
return;