summaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/mkpiggy.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 16:40:53 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 16:40:53 (GMT)
commit02c502566ef505d0469fa27567f48766c1f5f7af (patch)
treedd29678eb5f15ddfe537418eb83ad2c54074c37b /arch/x86/boot/compressed/mkpiggy.c
parentf06fc0c0de0b4f01dbad8ec5552e78192c7abbb8 (diff)
parenta51f4047758d2bcd099ea113b833ed380f4024ba (diff)
downloadlinux-fsl-qoriq-02c502566ef505d0469fa27567f48766c1f5f7af.tar.xz
Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/build changes from Ingo Molnar. * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, build: Fix portability issues when cross-building x86, tools: Remove unneeded header files from tools/build.c USB: ffs-test: Don't duplicate {get,put}_unaligned*() functions x86, efi: Fix endian issues and unaligned accesses x86, boot: Restrict CFLAGS for hostprogs x86, mkpiggy: Don't open code put_unaligned_le32() x86, relocs: Don't open code put_unaligned_le32() tools/include: Add byteshift headers for endian access
Diffstat (limited to 'arch/x86/boot/compressed/mkpiggy.c')
-rw-r--r--arch/x86/boot/compressed/mkpiggy.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
index 46a8238..958a641 100644
--- a/arch/x86/boot/compressed/mkpiggy.c
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -29,14 +29,7 @@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-
-static uint32_t getle32(const void *p)
-{
- const uint8_t *cp = p;
-
- return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
- ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
-}
+#include <tools/le_byteshift.h>
int main(int argc, char *argv[])
{
@@ -69,7 +62,7 @@ int main(int argc, char *argv[])
}
ilen = ftell(f);
- olen = getle32(&olen);
+ olen = get_unaligned_le32(&olen);
fclose(f);
/*