From: Julien Grall Date: Wed, 20 Jul 2022 18:22:34 +0000 (+0100) Subject: xen: page_alloc: Don't open-code IS_ALIGNED() X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~411 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7a2b7edad5d5508e2d6a2e5d0ad0399ae16e9c8e;p=xen.git xen: page_alloc: Don't open-code IS_ALIGNED() init_heap_pages() is using an open-code version of IS_ALIGNED(). Replace it to improve the readability of the code. No functional change intended. Signed-off-by: Julien Grall Reviewed-by: Wei Chen Acked-by: Jan Beulich --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 6ca986584d..013f3d142e 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1827,7 +1827,7 @@ static void init_heap_pages( unsigned long s = mfn_x(page_to_mfn(pg + i)); unsigned long e = mfn_x(mfn_add(page_to_mfn(pg + nr_pages - 1), 1)); bool use_tail = (nid == phys_to_nid(pfn_to_paddr(e - 1))) && - !(s & ((1UL << MAX_ORDER) - 1)) && + IS_ALIGNED(s, 1UL << MAX_ORDER) && (find_first_set_bit(e) <= find_first_set_bit(s)); unsigned long n;