mm/vmalloc: use PAGE_ALIGNED() to check PAGE_SIZE alignment
authorShawn Lin <shawn.lin@rock-chips.com>
Thu, 17 Mar 2016 21:20:37 +0000 (14:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 22:09:34 +0000 (15:09 -0700)
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>
mm/vmalloc.c

index e86c24ee94453df67c8d73b073e80ae404a2cfe6..ae7d20b447ffbd74da85e85201ed668d758d9e1b 100644 (file)
@@ -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);