aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Capitulino <[email protected]>2014-12-12 16:55:21 -0800
committerLinus Torvalds <[email protected]>2014-12-13 12:42:47 -0800
commitdf994ead54571f775329388c47f273c55e83b4d1 (patch)
tree03bc51790413809f56eeee2b5f8f7dc60602feb6
parent27ec26ecdca956a32e89a22a148f1c16b5c0becf (diff)
hugetlb: alloc_bootmem_huge_page(): use IS_ALIGNED()
No reason to duplicate the code of an existing macro. Signed-off-by: Luiz Capitulino <[email protected]> Cc: Andi Kleen <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Yasuaki Ishimatsu <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Davidlohr Bueso <[email protected]> Acked-by: Naoya Horiguchi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/hugetlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 989cb032eaf5..452a4e536237 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1457,7 +1457,7 @@ int __weak alloc_bootmem_huge_page(struct hstate *h)
return 0;
found:
- BUG_ON((unsigned long)virt_to_phys(m) & (huge_page_size(h) - 1));
+ BUG_ON(!IS_ALIGNED(virt_to_phys(m), huge_page_size(h)));
/* Put them into a private list first because mem_map is not up yet */
list_add(&m->list, &huge_boot_pages);
m->hstate = h;