linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Cc: David Rientjes <rientjes@google.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/page_isolation: use micro to judge the alignment
Date: Mon, 4 Jan 2016 06:51:12 +0000	[thread overview]
Message-ID: <20160104065058.GA10434@hori1.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20160104134154.40c28f94@debian>

On Mon, Jan 04, 2016 at 01:41:54PM +0800, Wang Xiaoqiang wrote:
> Hi, Naoya,
> 
> This patch simply use micro IS_ALIGNED() to judge the alignment,
> instead of directly judging.

Hi Xiaoqiang,

Can you apply the same cleanup to undo_isolate_page_range(), too?
But anyway, this looks a good cleanup to me.

Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>

Thanks,
Naoya Horiguchi

> Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
> ---
>  mm/page_isolation.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index 4568fd5..9248929 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -162,8 +162,8 @@ int start_isolate_page_range(unsigned long
> start_pfn, unsigned long end_pfn, unsigned long undo_pfn;
>  	struct page *page;
>  
> -	BUG_ON((start_pfn) & (pageblock_nr_pages - 1));
> -	BUG_ON((end_pfn) & (pageblock_nr_pages - 1));
> +	BUG_ON(!IS_ALIGNED(start_pfn, pageblock_nr_pages));
> +	BUG_ON(!IS_ALIGNED(end_pfn, pageblock_nr_pages));
>  
>  	for (pfn = start_pfn;
>  	     pfn < end_pfn;
> -- 
> 2.1.4
> 
> thanks
> Wang Xiaoqiang
> 
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

       reply	other threads:[~2016-01-04  6:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160104134154.40c28f94@debian>
2016-01-04  6:51 ` Naoya Horiguchi [this message]
     [not found] <20160104141901.414d24a8@debian>
2016-01-12 23:56 ` David Rientjes

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=20160104065058.GA10434@hori1.linux.bs1.fc.nec.co.jp \
    --to=n-horiguchi@ah.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=wangxq10@lzu.edu.cn \
    /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