Skip to contentSkip to conversation

arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED

PATCH Applied Alexander Kuleshov 3 participants 3 messages Oct 26, 2015 – Oct 28, 2015 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/mm: use PAGE_ALIGNED instead of IS_ALIGNED

The <linux/mm.h> already provides the PAGE_ALIGNED macro. Let's use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly.

---
 arch/arm64/mm/pageattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/mm/pageattr.c +1 -1
index e47ed1c..3571c73 100644
@@ -45,7 +45,7 @@ static int change_memory_common(unsigned long addr, int numpages,
 	int ret;
 	struct page_change_data data;
 
-	if (!IS_ALIGNED(addr, PAGE_SIZE)) {
+	if (!PAGE_ALIGNED(addr)) {
 		start &= PAGE_MASK;
 		end = start + size;
 		WARN_ON_ONCE(1);
Signature · 1 line
2.6.0
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexander Kuleshov

The <linux/mm.h> already provides the PAGE_ALIGNED macro. Let's use this macro instead of IS_ALIGNED and passing PAGE_SIZE directly.

Quoted 18 lines
---
  arch/arm64/mm/pageattr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/mm/pageattr.c +1 -1
index e47ed1c..3571c73 100644
@@ -45,7 +45,7 @@ static int change_memory_common(unsigned long addr, int numpages,
  	int ret;
  	struct page_change_data data;
 
-	if (!IS_ALIGNED(addr, PAGE_SIZE)) {
+	if (!PAGE_ALIGNED(addr)) {
  		start &= PAGE_MASK;
  		end = start + size;
  		WARN_ON_ONCE(1);