summaryrefslogtreecommitdiff
path: root/kexec/crashdump-elf.c
diff options
context:
space:
mode:
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>2013-03-15 17:46:35 +0800
committerSimon Horman <horms@verge.net.au>2013-03-15 16:51:02 +0100
commit56af4f566a637b8dd78a8d4ea8624e3d27645e6e (patch)
treea8a120370c50ceda5ee1c2ddb4a14c2cc199d1f7 /kexec/crashdump-elf.c
parent337d4fcbdc45e61cab28f8ba6da49015cca5c8d0 (diff)
kexec: use _ALIGN* to make the logic clear
By replacing all the explicit align opertion with marco _ALIGN*, the code logic could more clear. Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/crashdump-elf.c')
-rw-r--r--kexec/crashdump-elf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
index ec66548..2baa357 100644
--- a/kexec/crashdump-elf.c
+++ b/kexec/crashdump-elf.c
@@ -96,8 +96,7 @@ int FUNC(struct kexec_info *info,
return -1;
}
- sz += align - 1;
- sz &= ~(align - 1);
+ sz = _ALIGN(sz, align);
bufp = xmalloc(sz);
memset(bufp, 0, sz);