From: Luiz Capitulino Date: Sat, 13 Dec 2014 00:55:21 +0000 (-0800) Subject: hugetlb: alloc_bootmem_huge_page(): use IS_ALIGNED() X-Git-Tag: v3.19-rc1~93^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df994ead54571f775329388c47f273c55e83b4d1;p=platform%2Fkernel%2Flinux-exynos.git hugetlb: alloc_bootmem_huge_page(): use IS_ALIGNED() No reason to duplicate the code of an existing macro. Signed-off-by: Luiz Capitulino Cc: Andi Kleen Acked-by: David Rientjes Cc: Rik van Riel Cc: Yasuaki Ishimatsu Cc: Yinghai Lu Cc: Davidlohr Bueso Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;