From 2ed28818a77b7e9d5b5150a654c9df8024833707 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 14 Apr 2021 08:21:04 +1000 Subject: [PATCH] mmmemory_hotplug-allocate-memmap-from-the-added-memory-range-fix typo & code cleanup, per David Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 143abefbdbe6..50969933b6df 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1097,7 +1097,7 @@ bool mhp_supports_memmap_on_memory(unsigned long size) * Besides having arch support and the feature enabled at runtime, we * need a few more assumptions to hold true: * - * a) We span a single memory block: memory onlining/offlinin;g happens + * a) We span a single memory block: memory onlining/offlining happens * in memory block granularity. We don't want the vmemmap of online * memory blocks to reside on offline memory blocks. In the future, * we might want to support variable-sized memory blocks to make the @@ -1123,7 +1123,7 @@ bool mhp_supports_memmap_on_memory(unsigned long size) IS_ENABLED(CONFIG_MHP_MEMMAP_ON_MEMORY) && size == memory_block_size_bytes() && IS_ALIGNED(vmemmap_size, PMD_SIZE) && - IS_ALIGNED(remaining_size, (pageblock_nr_pages << PAGE_SHIFT)); + IS_ALIGNED(remaining_size, pageblock_nr_pages << PAGE_SHIFT); } /* -- 2.51.0