[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f65a79ca-0cf8-91e1-ecd3-24ede70858ae@huawei.com>
Date: Fri, 27 May 2022 09:48:00 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: <bh1scw@...il.com>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
Muchun Song <songmuchun@...edance.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm: use PAGE_ALIGNED instead of IS_ALIGNED
On 2022/5/26 22:02, bh1scw@...il.com wrote:
> From: Fanjun Kong <bh1scw@...il.com>
>
> The <linux/mm.h> already provides the PAGE_ALIGNED macro. Let's
> use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly.
>
> Signed-off-by: Fanjun Kong <bh1scw@...il.com>
Reviewed-by: Miaohe Lin <linmiaohe@...wei.com>
Thanks!
> ---
> mm/sparse-vmemmap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
> index f4fa61dbbee3..49cb15cbe590 100644
> --- a/mm/sparse-vmemmap.c
> +++ b/mm/sparse-vmemmap.c
> @@ -200,8 +200,8 @@ static int vmemmap_remap_range(unsigned long start, unsigned long end,
> unsigned long next;
> pgd_t *pgd;
>
> - VM_BUG_ON(!IS_ALIGNED(start, PAGE_SIZE));
> - VM_BUG_ON(!IS_ALIGNED(end, PAGE_SIZE));
> + VM_BUG_ON(!PAGE_ALIGNED(start));
> + VM_BUG_ON(!PAGE_ALIGNED(end));
>
> pgd = pgd_offset_k(addr);
> do {
>
Powered by blists - more mailing lists