[PATCH 06/13] kexec: arm: use _ALIGN* to make the logic clear
Zhang Yanfei
zhangyanfei.yes at gmail.com
Wed Mar 13 13:29:34 EDT 2013
From: Zhang Yanfei <zhangyanfei at 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 at 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
More information about the kexec
mailing list