x86/mm: Use PAGE_ALIGNED instead of IS_ALIGNED
authorKefeng Wang <wangkefeng.wang@huawei.com>
Tue, 12 Jan 2016 02:19:30 +0000 (10:19 +0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 12 Jan 2016 10:09:48 +0000 (11:09 +0100)
Use PAGE_ALIGEND macro in <linux/mm.h> to simplify code.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: <guohanjun@huawei.com>
Cc: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1452565170-11083-1-git-send-email-wangkefeng.wang@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/init_64.c

index ec081fe..8829482 100644 (file)
@@ -814,8 +814,7 @@ remove_pte_table(pte_t *pte_start, unsigned long addr, unsigned long end,
                if (phys_addr < (phys_addr_t)0x40000000)
                        return;
 
-               if (IS_ALIGNED(addr, PAGE_SIZE) &&
-                   IS_ALIGNED(next, PAGE_SIZE)) {
+               if (PAGE_ALIGNED(addr) && PAGE_ALIGNED(next)) {
                        /*
                         * Do not free direct mapping pages since they were
                         * freed when offlining, or simplely not in use.