linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/vmalloc: reuse PAGE_ALIGNED to check PAGE_SIZE aligned
@ 2016-03-12  7:55 Shawn Lin
  0 siblings, 0 replies; only message in thread
From: Shawn Lin @ 2016-03-12  7:55 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Joonsoo Kim, Roman Pen, linux-mm, Johannes Weiner, linux-kernel,
	Shawn Lin

we have defined 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>
---

 mm/vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index e86c24e..ae7d20b 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -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);
-- 
2.3.7


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-12  8:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-12  7:55 [PATCH] mm/vmalloc: reuse PAGE_ALIGNED to check PAGE_SIZE aligned Shawn Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox