]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mm_init.c: use round_up() to calculate usermap size
authorWei Yang <richard.weiyang@gmail.com>
Wed, 12 Feb 2025 01:38:18 +0000 (01:38 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 01:00:00 +0000 (17:00 -0800)
commit8653cd677521166eb9b5bd72ef77a75d369b2d06
tree325d93bedc48b14bb476c18bdddcca38cc1e575e
parenta0a5bfe59b202277834590694004a1110f6c20bd
mm/mm_init.c: use round_up() to calculate usermap size

Since pageblock_nr_pages and BITS_PER_LONG are power of 2, we could use
round_up() to calculate it.

Also we have renamed blockflags to pageblock_flags, adjust the comment
accordingly.

Link: https://lkml.kernel.org/r/20250212013818.873-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Suggested-by: Shivank Garg <shivankg@amd.com>
Reviewed-by: Shivank Garg <shivankg@amd.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mm_init.c