Skip to content

Commit

Permalink
mm/vmalloc: use PAGE_ALIGNED() to check PAGE_SIZE alignment
Browse files Browse the repository at this point in the history
We have PAGE_ALIGNED() in mm.h, so let's use it instead of IS_ALIGNED()
for checking PAGE_SIZE aligned case.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
shawn1221 authored and torvalds committed Mar 17, 2016
1 parent e0775d1 commit a1c0b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ void vm_unmap_ram(const void *mem, unsigned int count)
BUG_ON(!addr);
BUG_ON(addr < VMALLOC_START);
BUG_ON(addr > VMALLOC_END);
BUG_ON(!IS_ALIGNED(addr, PAGE_SIZE));
BUG_ON(!PAGE_ALIGNED(addr));

debug_check_no_locks_freed(mem, size);
vmap_debug_free_range(addr, addr+size);
Expand Down

0 comments on commit a1c0b1a

Please sign in to comment.