2
0

057-arm_fix_uncompress_code.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. From b53e9b5ebd5c6e718f54bcacd4e97b71533ca681 Mon Sep 17 00:00:00 2001
  2. From: Tony Lindgren <[email protected]>
  3. Date: Thu, 14 Jan 2010 20:36:55 +0100
  4. Subject: [PATCH] ARM: 5882/1: ARM: Fix uncompress code compile for different defines of flush(void)
  5. Because of the include of the decompress_inflate.c file from
  6. boot/compress/misc.c, there are different flush() defines:
  7. In file included from arch/arm/boot/compressed/misc.c:249:
  8. arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:138:29: error: macro "flush" passed 2 arguments, but takes just 0
  9. Fix this by removing the define of flush() in misc.c for
  10. CONFIG_DEBUG_ICEDCC as it's already defined in mach/uncompress.h,
  11. and that is being included unconditionally.
  12. Also use a static inline function instead of define
  13. for mach-mxc and mach-gemini to avoid similar bug
  14. for those platforms.
  15. Signed-off-by: Tony Lindgren <[email protected]>
  16. Signed-off-by: Russell King <[email protected]>
  17. ---
  18. arch/arm/boot/compressed/misc.c | 1 -
  19. arch/arm/mach-gemini/include/mach/uncompress.h | 4 +++-
  20. arch/arm/plat-mxc/include/mach/uncompress.h | 4 +++-
  21. 3 files changed, 6 insertions(+), 3 deletions(-)
  22. --- a/arch/arm/boot/compressed/misc.c
  23. +++ b/arch/arm/boot/compressed/misc.c
  24. @@ -88,7 +88,6 @@ static void icedcc_putc(int ch)
  25. #endif
  26. #define putc(ch) icedcc_putc(ch)
  27. -#define flush() do { } while (0)
  28. #endif
  29. static void putstr(const char *ptr)
  30. --- a/arch/arm/mach-gemini/include/mach/uncompress.h
  31. +++ b/arch/arm/mach-gemini/include/mach/uncompress.h
  32. @@ -30,7 +30,9 @@ static inline void putc(char c)
  33. UART[UART_TX] = c;
  34. }
  35. -#define flush() do { } while (0)
  36. +static inline void flush(void)
  37. +{
  38. +}
  39. /*
  40. * nothing to do
  41. --- a/arch/arm/plat-mxc/include/mach/uncompress.h
  42. +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
  43. @@ -60,7 +60,9 @@ static void putc(int ch)
  44. UART(TXR) = ch;
  45. }
  46. -#define flush() do { } while (0)
  47. +static inline void flush(void)
  48. +{
  49. +}
  50. #define MX1_UART1_BASE_ADDR 0x00206000
  51. #define MX25_UART1_BASE_ADDR 0x43f90000