From: Zhang Yanfei <[email protected]>

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

Signed-off-by: Zhang Yanfei <[email protected]>
---
 kexec/arch/x86_64/kexec-bzImage64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kexec/arch/x86_64/kexec-bzImage64.c 
b/kexec/arch/x86_64/kexec-bzImage64.c
index 1496573..86e6d13 100644
--- a/kexec/arch/x86_64/kexec-bzImage64.c
+++ b/kexec/arch/x86_64/kexec-bzImage64.c
@@ -197,7 +197,7 @@ static int do_bzImage64_load(struct kexec_info *info,
        k_size = kernel_len - kern16_size;
        /* need to use run-time size for buffer searching */
        dbgprintf("kernel init_size 0x%x\n", real_mode->init_size);
-       size = (real_mode->init_size + (4096 - 1)) & ~(4096 - 1);
+       size = _ALIGN(real_mode->init_size, 4096);
        align = real_mode->kernel_alignment;
        addr = add_buffer(info, kernel + kern16_size, k_size,
                          size, align, 0x100000, -1, -1);
-- 
1.7.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to