]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory_hotplug: clean up try_offline_node
authorMiaohe Lin <linmiaohe@huawei.com>
Tue, 22 Mar 2022 21:47:22 +0000 (14:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Mar 2022 22:57:10 +0000 (15:57 -0700)
commit7a6ba9831d8a3098778651403befed82bae5b3cf
tree48ad0edf8d44fdf64b7f742a10bede49bb0459f5
parent5db1f5e9a896a5643f60ad5da317462d26cd7ae5
mm/memory_hotplug: clean up try_offline_node

We can use helper macro node_spanned_pages to check whether node spans
pages.  And we can change the parameter of check_cpu_on_node to nid as
that's what it really cares.  Thus we can further get rid of the local
variable pgdat and improve the readability a bit.

Link: https://lkml.kernel.org/r/20220207133643.23427-4-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c