From: Naoya Horiguchi Date: Thu, 14 Jan 2016 23:22:13 +0000 (-0800) Subject: mm/page_isolation: use macro to judge the alignment X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fec174d6699e2e39d34c7c6ee2fe360e518e68c0;p=openwrt%2Fstaging%2Fblogic.git mm/page_isolation: use macro to judge the alignment Signed-off-by: Wang Xiaoqiang Reviewed-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_isolation.c b/mm/page_isolation.c index f484b9300fe3..5e139fec6c6c 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -165,8 +165,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;