linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] mm/page_isolation: use micro to judge the alignment
       [not found] <20160104141901.414d24a8@debian>
@ 2016-01-12 23:56 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2016-01-12 23:56 UTC (permalink / raw)
  To: Wang Xiaoqiang; +Cc: Naoya Horiguchi, linux-mm

On Mon, 4 Jan 2016, Wang Xiaoqiang wrote:

> Hi, Naoya,
> 
> This is the final version of the patch.
> 
> Use micro IS_ALIGNED() to judge the aligment, instead of directly
> judging.
> 
> Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn>

Acked-by: David Rientjes <rientjes@google.com>

--
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

* 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

end of thread, other threads:[~2016-01-12 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20160104141901.414d24a8@debian>
2016-01-12 23:56 ` [PATCH] mm/page_isolation: use micro to judge the alignment David Rientjes
     [not found] <20160104134154.40c28f94@debian>
2016-01-04  6:51 ` Naoya Horiguchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox