diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2020-08-26 15:01:03 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2020-09-07 10:56:08 +0200 |
commit | 41f1bf37a63ecdb06b7b96646579170ddbe9def1 (patch) | |
tree | 012990f611ff212e11b3a724b8efd7f95e8f2769 /arch/m68k/mm | |
parent | dc072012bc94287e3cc43e1429c5d72b2e6f4972 (diff) |
m68k: mm: Use PAGE_ALIGNED() helper
Use the existing PAGE_ALIGNED() helper instead of open-coding the same
operation.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200826130103.25381-1-geert@linux-m68k.org
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r-- | arch/m68k/mm/motorola.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 2bb006bdc31c..a9bdde54ca35 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -226,7 +226,7 @@ static pte_t * __init kernel_page_table(void) { pte_t *pte_table = last_pte_table; - if (((unsigned long)last_pte_table & ~PAGE_MASK) == 0) { + if (PAGE_ALIGNED(last_pte_table)) { pte_table = (pte_t *)memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); if (!pte_table) { panic("%s: Failed to allocate %lu bytes align=%lx\n", @@ -274,7 +274,7 @@ static pmd_t * __init kernel_ptr_table(void) } last_pmd_table += PTRS_PER_PMD; - if (((unsigned long)last_pmd_table & ~PAGE_MASK) == 0) { + if (PAGE_ALIGNED(last_pmd_table)) { last_pmd_table = (pmd_t *)memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); if (!last_pmd_table) |