Skip to content

Commit 41f1bf3

Browse files
committed
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
1 parent dc07201 commit 41f1bf3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/m68k/mm/motorola.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static pte_t * __init kernel_page_table(void)
226226
{
227227
pte_t *pte_table = last_pte_table;
228228

229-
if (((unsigned long)last_pte_table & ~PAGE_MASK) == 0) {
229+
if (PAGE_ALIGNED(last_pte_table)) {
230230
pte_table = (pte_t *)memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
231231
if (!pte_table) {
232232
panic("%s: Failed to allocate %lu bytes align=%lx\n",
@@ -274,7 +274,7 @@ static pmd_t * __init kernel_ptr_table(void)
274274
}
275275

276276
last_pmd_table += PTRS_PER_PMD;
277-
if (((unsigned long)last_pmd_table & ~PAGE_MASK) == 0) {
277+
if (PAGE_ALIGNED(last_pmd_table)) {
278278
last_pmd_table = (pmd_t *)memblock_alloc_low(PAGE_SIZE,
279279
PAGE_SIZE);
280280
if (!last_pmd_table)

0 commit comments

Comments
 (0)