diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2013-03-14 01:31:31 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-03-14 09:49:17 +0100 |
commit | d41a4db8ef0a5995cb2fd8e88220b721be36bc0a (patch) | |
tree | 1e8a3a1cca5eb5be5189129a2505ba4febd5d0c6 /kexec/arch/mips | |
parent | e8a7f63e0e05617c2edaad7eb618ec6513288b8b (diff) |
kexec: mips: use _ALIGN* to make the logic clear
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>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/mips')
-rw-r--r-- | kexec/arch/mips/crashdump-mips.c | 2 | ||||
-rw-r--r-- | kexec/arch/mips/kexec-elf-mips.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c index 6f9f6c6..8e7b1c3 100644 --- a/kexec/arch/mips/crashdump-mips.c +++ b/kexec/arch/mips/crashdump-mips.c @@ -373,7 +373,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline, info->backup_src_start = BACKUP_SRC_START; info->backup_src_size = BACKUP_SRC_SIZE; /* Create a backup region segment to store backup data*/ - sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1); + sz = _ALIGN(BACKUP_SRC_SIZE, align); tmp = xmalloc(sz); memset(tmp, 0, sz); info->backup_start = add_buffer(info, tmp, sz, sz, align, diff --git a/kexec/arch/mips/kexec-elf-mips.c b/kexec/arch/mips/kexec-elf-mips.c index 3e19ca2..6951247 100644 --- a/kexec/arch/mips/kexec-elf-mips.c +++ b/kexec/arch/mips/kexec-elf-mips.c @@ -34,7 +34,7 @@ static const int probe_debug = 0; #define BOOTLOADER "kexec" #define MAX_COMMAND_LINE 256 -#define UPSZ(X) ((sizeof(X) + 3) & ~3) +#define UPSZ(X) _ALIGN_UP(sizeof(X), 4) static char cmdline_buf[256] = "kexec "; int elf_mips_probe(const char *buf, off_t len) |