[PATCH 03/13] kexec: ppc: remove duplicated _ALIGN_* macros

Zhang Yanfei zhangyanfei.yes at gmail.com
Wed Mar 13 13:23:49 EDT 2013


From: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>

We have defined the global align macros for use, so remove the
duplicated macros here.

And in file kexec/arch/ppc/include/page.h, we directly expand the
align operation for marco PAGE_ALIGN since we have removed marco
_ALIGN in this file.

Signed-off-by: Zhang Yanfei <zhangyanfei at cn.fujitsu.com>
---
 kexec/arch/ppc/include/page.h      |    9 +--------
 kexec/arch/ppc64/crashdump-ppc64.h |    2 --
 2 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/kexec/arch/ppc/include/page.h b/kexec/arch/ppc/include/page.h
index 14eca30..65877bc 100644
--- a/kexec/arch/ppc/include/page.h
+++ b/kexec/arch/ppc/include/page.h
@@ -21,14 +21,7 @@
 #define PAGE_SIZE	(ASM_CONST(1) << PAGE_SHIFT)
 #define PAGE_MASK	(~(PAGE_SIZE-1))
 
-/* align addr on a size boundary - adjust address up/down if needed */
-#define _ALIGN_UP(addr,size)	(((addr)+((size)-1))&(~((size)-1)))
-#define _ALIGN_DOWN(addr,size)	((addr)&(~((size)-1)))
-
-/* align addr on a size boundary - adjust address up if needed */
-#define _ALIGN(addr,size)     _ALIGN_UP(addr,size)
-
 /* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr)	_ALIGN(addr, PAGE_SIZE)
+#define PAGE_ALIGN(addr)	(((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
 
 #endif				/* _PPC_BOOT_PAGE_H */
diff --git a/kexec/arch/ppc64/crashdump-ppc64.h b/kexec/arch/ppc64/crashdump-ppc64.h
index 739c61f..e9d28c9 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.h
+++ b/kexec/arch/ppc64/crashdump-ppc64.h
@@ -20,8 +20,6 @@ void add_usable_mem_rgns(unsigned long long base, unsigned long long size);
 #define BACKUP_SRC_SIZE     (BACKUP_SRC_END - BACKUP_SRC_START + 1)
 
 #define KDUMP_BACKUP_LIMIT	BACKUP_SRC_SIZE
-#define _ALIGN_UP(addr,size)	(((addr)+((size)-1))&(~((size)-1)))
-#define _ALIGN_DOWN(addr,size)	((addr)&(~((size)-1)))
 
 #define KERNEL_RUN_AT_ZERO_MAGIC 0x72756e30	/* "run0" */
 
-- 
1.7.1




More information about the kexec mailing list