[PATCH 06/13] kexec: arm: use _ALIGN* to make the logic clear

Zhang Yanfei
2013-03-13T17:29:43Z

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

By replacing all the explicit align opertion with marco _ALIGN*,
the code logic could be more clear.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
kexec/arch/arm/kexec-zImage-arm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index db29a7b..dd2e06f 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -414,7 +414,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
* align it.
*/
dtb_offset = initrd_base + initrd_size + getpagesize();
- dtb_offset &= ~(getpagesize() - 1);
+ dtb_offset = _ALIGN_DOWN(dtb_offset, getpagesize());

add_segment(info, dtb_buf, dtb_length,
dtb_offset, dtb_length);
--
1.7.1