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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>

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




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux