From: Miaohe Lin <linmiaohe@huawei.com>
To: <bh1scw@gmail.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
Muchun Song <songmuchun@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: use PAGE_ALIGNED instead of IS_ALIGNED
Date: Fri, 27 May 2022 09:48:00 +0800 [thread overview]
Message-ID: <f65a79ca-0cf8-91e1-ecd3-24ede70858ae@huawei.com> (raw)
In-Reply-To: <20220526140257.1568744-1-bh1scw@gmail.com>
On 2022/5/26 22:02, bh1scw@gmail.com wrote:
> From: Fanjun Kong <bh1scw@gmail.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@gmail.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.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 {
>
prev parent reply other threads:[~2022-05-27 1:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 14:02 [PATCH] mm: use PAGE_ALIGNED instead of IS_ALIGNED bh1scw
2022-05-26 14:54 ` Muchun Song
2022-05-27 1:48 ` Miaohe Lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f65a79ca-0cf8-91e1-ecd3-24ede70858ae@huawei.com \
--to=linmiaohe@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=bh1scw@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=songmuchun@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).