]> 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)
commit60cee37b244986c335386a3f06e341de1aff910d
tree48ad0edf8d44fdf64b7f742a10bede49bb0459f5
parent8d0233c320b16b8737d0c48a544d18b91052a026
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