Skip to content

Commit

Permalink
x86, relocs: Don't open code put_unaligned_le32()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Fleming authored and H. Peter Anvin committed Feb 28, 2012
1 parent a07f767 commit 55f9709
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/x86/boot/compressed/relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define USE_BSD
#include <endian.h>
#include <regex.h>
#include <tools/le_byteshift.h>

static void die(char *fmt, ...);

Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 55f9709

Please sign in to comment.