* [PATCH] m68k: mm: Use PAGE_ALIGNED() helper
@ 2020-08-26 13:01 Geert Uytterhoeven
2020-09-07 8:48 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-08-26 13:01 UTC (permalink / raw)
To: linux-m68k; +Cc: Peter Zijlstra, linux-kernel, Geert Uytterhoeven
Use the existing PAGE_ALIGNED() helper instead of open-coding the same
operation.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/mm/motorola.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index 2bb006bdc31cd644..a9bdde54ca350197 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)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] m68k: mm: Use PAGE_ALIGNED() helper
2020-08-26 13:01 [PATCH] m68k: mm: Use PAGE_ALIGNED() helper Geert Uytterhoeven
@ 2020-09-07 8:48 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-09-07 8:48 UTC (permalink / raw)
To: linux-m68k; +Cc: Peter Zijlstra, Linux Kernel Mailing List
On Wed, Aug 26, 2020 at 3:01 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Use the existing PAGE_ALIGNED() helper instead of open-coding the same
> operation.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Thanks, queueing in the m68k for-v5.10 branch.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-07 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 13:01 [PATCH] m68k: mm: Use PAGE_ALIGNED() helper Geert Uytterhoeven
2020-09-07 8:48 ` Geert Uytterhoeven
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.