diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-02-28 13:37:21 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-28 10:22:55 -0800 |
commit | 55f9709cd07c9d33e30b575ee1b3bfd0aeaa3760 (patch) | |
tree | a0847b0a0c4c53903b3762c163d813335aac8c1e /arch/x86/boot | |
parent | a07f7672d7cf0ff0d6e548a9feb6e0bd016d9c6c (diff) | |
download | linux-3.10-55f9709cd07c9d33e30b575ee1b3bfd0aeaa3760.tar.gz linux-3.10-55f9709cd07c9d33e30b575ee1b3bfd0aeaa3760.tar.bz2 linux-3.10-55f9709cd07c9d33e30b575ee1b3bfd0aeaa3760.zip |
x86, relocs: Don't open code put_unaligned_le32()
Use the new headers in tools/include instead of rolling our own
put_unaligned_le32() implementation.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-3-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/compressed/relocs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c index 89bbf4e4d05..d3c0b027766 100644 --- a/arch/x86/boot/compressed/relocs.c +++ b/arch/x86/boot/compressed/relocs.c @@ -10,6 +10,7 @@ #define USE_BSD #include <endian.h> #include <regex.h> +#include <tools/le_byteshift.h> static void die(char *fmt, ...); @@ -605,10 +606,7 @@ static void emit_relocs(int as_text) fwrite("\0\0\0\0", 4, 1, stdout); /* Now print each relocation */ for (i = 0; i < reloc_count; i++) { - buf[0] = (relocs[i] >> 0) & 0xff; - buf[1] = (relocs[i] >> 8) & 0xff; - buf[2] = (relocs[i] >> 16) & 0xff; - buf[3] = (relocs[i] >> 24) & 0xff; + put_unaligned_le32(relocs[i], buf); fwrite(buf, 4, 1, stdout); } } |