From: Dan Williams Date: Thu, 18 Jul 2019 22:58:15 +0000 (-0700) Subject: mm/hotplug: kill is_dev_zone() usage in __remove_pages() X-Git-Tag: v5.15~5884^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96da4350000973ef9310a10d077d65bbc017f093;p=platform%2Fkernel%2Flinux-starfive.git mm/hotplug: kill is_dev_zone() usage in __remove_pages() The zone type check was a leftover from the cleanup that plumbed altmap through the memory hotplug path, i.e. commit da024512a1fa "mm: pass the vmem_altmap to arch_remove_memory and __remove_pages". Link: http://lkml.kernel.org/r/156092352642.979959.6664333788149363039.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Logan Gunthorpe Cc: Pavel Tatashin Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 8546791..1122004 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -535,9 +535,7 @@ void __remove_pages(struct zone *zone, unsigned long phys_start_pfn, unsigned long map_offset = 0; int sections_to_remove; - /* In the ZONE_DEVICE case device driver owns the memory region */ - if (is_dev_zone(zone)) - map_offset = vmem_altmap_offset(altmap); + map_offset = vmem_altmap_offset(altmap); clear_zone_contiguous(zone);