Skip to content

Commit

Permalink
ARM: 5882/1: ARM: Fix uncompress code compile for different defines o…
Browse files Browse the repository at this point in the history
…f flush(void)

Because of the include of the decompress_inflate.c file from
boot/compress/misc.c, there are different flush() defines:

In file included from arch/arm/boot/compressed/misc.c:249:
arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:138:29: error: macro "flush" passed 2 arguments, but takes just 0

Fix this by removing the define of flush() in misc.c for
CONFIG_DEBUG_ICEDCC as it's already defined in mach/uncompress.h,
and that is being included unconditionally.

Also use a static inline function instead of define
for mach-mxc and mach-gemini to avoid similar bug
for those platforms.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Tony Lindgren authored and Russell King committed Jan 18, 2010
1 parent 95b8f20 commit b53e9b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion arch/arm/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ static void icedcc_putc(int ch)
#endif

#define putc(ch) icedcc_putc(ch)
#define flush() do { } while (0)
#endif

static void putstr(const char *ptr)
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-gemini/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ static inline void putc(char c)
UART[UART_TX] = c;
}

#define flush() do { } while (0)
static inline void flush(void)
{
}

/*
* nothing to do
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/plat-mxc/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ static void putc(int ch)
UART(TXR) = ch;
}

#define flush() do { } while (0)
static inline void flush(void)
{
}

#define MX1_UART1_BASE_ADDR 0x00206000
#define MX25_UART1_BASE_ADDR 0x43f90000
Expand Down

0 comments on commit b53e9b5

Please sign in to comment.