Re: [PATCH] mm/page_isolation: use micro to judge the alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Thanks,
Naoya Horiguchi

> Signed-off-by: Wang Xiaoqiang <wangxq10@xxxxxxxxxx>
> ---
>  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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]