diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2013-03-14 01:21:43 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-03-14 09:39:15 +0100 |
commit | 412561a36c0bbe75502bcaba692f78999351c531 (patch) | |
tree | c12355e32d8539859740e5dc18c6a87a966cc8ab /kexec/kexec-elf-boot.c | |
parent | 9ea6e0577b67febf117c8340d4bb69fa8bf24554 (diff) |
kexec: use _ALIGN() instead of align()
Since we have imported macro _ALIGN() for global use, replace the call
of function align() with _ALIGN() and remove align().
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-elf-boot.c')
-rw-r--r-- | kexec/kexec-elf-boot.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/kexec/kexec-elf-boot.c b/kexec/kexec-elf-boot.c index 9a160bb..f082f8b 100644 --- a/kexec/kexec-elf-boot.c +++ b/kexec/kexec-elf-boot.c @@ -67,12 +67,6 @@ static struct boot_notes { }, }; -static inline unsigned long align(unsigned long val, unsigned long align) -{ - return (val + align - 1) & ~(align - 1); - -} - unsigned long elf_boot_notes( struct kexec_info *info, unsigned long max_addr, const char *cmdline, int cmdline_len) @@ -80,7 +74,7 @@ unsigned long elf_boot_notes( unsigned long note_bytes; unsigned long note_base; struct boot_notes *notes; - note_bytes = sizeof(*notes) + align(cmdline_len, 4); + note_bytes = sizeof(*notes) + _ALIGN(cmdline_len, 4); notes = xmalloc(note_bytes); memcpy(notes, &boot_notes, sizeof(boot_notes)); memcpy(notes->command_line, cmdline, cmdline_len); |