]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
hugetlb: alloc_bootmem_huge_page(): use IS_ALIGNED()
authorLuiz Capitulino <lcapitulino@redhat.com>
Sat, 13 Dec 2014 00:55:21 +0000 (16:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Dec 2014 20:42:47 +0000 (12:42 -0800)
No reason to duplicate the code of an existing macro.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c

index 989cb032eaf512913b46c2ee2aa8e7014649aa7d..452a4e53623772167d1d9d3ef53bd32aab964409 100644 (file)
@@ -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;