* Re: [PATCH] mm/page_isolation: use micro to judge the alignment
[not found] <20160104134154.40c28f94@debian>
@ 2016-01-04 6:51 ` Naoya Horiguchi
0 siblings, 0 replies; 2+ messages in thread
From: Naoya Horiguchi @ 2016-01-04 6:51 UTC (permalink / raw)
To: Wang Xiaoqiang; +Cc: David Rientjes, linux-mm, Andrew Morton
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>
^ permalink raw reply [flat|nested] 2+ messages in thread