Skip to content

Commit fec174d

Browse files
Naoya Horiguchitorvalds
authored andcommitted
mm/page_isolation: use macro to judge the alignment
Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 543dfb2 commit fec174d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/page_isolation.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
165165
unsigned long undo_pfn;
166166
struct page *page;
167167

168-
BUG_ON((start_pfn) & (pageblock_nr_pages - 1));
169-
BUG_ON((end_pfn) & (pageblock_nr_pages - 1));
168+
BUG_ON(!IS_ALIGNED(start_pfn, pageblock_nr_pages));
169+
BUG_ON(!IS_ALIGNED(end_pfn, pageblock_nr_pages));
170170

171171
for (pfn = start_pfn;
172172
pfn < end_pfn;

0 commit comments

Comments
 (0)