Commit cecd9b3f authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM PATCH] 2097/2: more gcc-3.4.1 warning fixes

Patch from Nicolas Pitre

At least gcc-3.4.1 complains about puts() declaration conflicting
with its own idea of it.  Our puts() declaration and implementation
isn't standard anyway, so let's rename it to putstr() like on x86.

Signed-off-by: Nicolas Pitre 
parent 0eaf89f2
...@@ -23,17 +23,17 @@ unsigned int __machine_arch_type; ...@@ -23,17 +23,17 @@ unsigned int __machine_arch_type;
#include <asm/arch/uncompress.h> #include <asm/arch/uncompress.h>
#ifdef STANDALONE_DEBUG #ifdef STANDALONE_DEBUG
#define puts printf #define putstr printf
#endif #endif
#ifdef CONFIG_DEBUG_ICEDCC #ifdef CONFIG_DEBUG_ICEDCC
#define puts icedcc_puts #define putstr icedcc_putstr
#define putc icedcc_putc #define putc icedcc_putc
extern void idedcc_putc(int ch); extern void idedcc_putc(int ch);
static void static void
icedcc_puts(const char *ptr) icedcc_putstr(const char *ptr)
{ {
for (; *ptr != '\0'; ptr++) { for (; *ptr != '\0'; ptr++) {
icedcc_putc(*ptr); icedcc_putc(*ptr);
...@@ -191,7 +191,7 @@ static void error(char *m); ...@@ -191,7 +191,7 @@ static void error(char *m);
static void gzip_mark(void **); static void gzip_mark(void **);
static void gzip_release(void **); static void gzip_release(void **);
static void puts(const char *); static void putstr(const char *);
extern int end; extern int end;
static ulg free_mem_ptr; static ulg free_mem_ptr;
...@@ -280,14 +280,14 @@ void flush_window(void) ...@@ -280,14 +280,14 @@ void flush_window(void)
bytes_out += (ulg)outcnt; bytes_out += (ulg)outcnt;
output_ptr += (ulg)outcnt; output_ptr += (ulg)outcnt;
outcnt = 0; outcnt = 0;
puts("."); putstr(".");
} }
static void error(char *x) static void error(char *x)
{ {
puts("\n\n"); putstr("\n\n");
puts(x); putstr(x);
puts("\n\n -- System halted"); putstr("\n\n -- System halted");
while(1); /* Halt */ while(1); /* Halt */
} }
...@@ -306,9 +306,9 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, ...@@ -306,9 +306,9 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p,
arch_decomp_setup(); arch_decomp_setup();
makecrc(); makecrc();
puts("Uncompressing Linux..."); putstr("Uncompressing Linux...");
gunzip(); gunzip();
puts(" done, booting the kernel.\n"); putstr(" done, booting the kernel.\n");
return output_ptr; return output_ptr;
} }
#else #else
...@@ -320,9 +320,9 @@ int main() ...@@ -320,9 +320,9 @@ int main()
output_data = output_buffer; output_data = output_buffer;
makecrc(); makecrc();
puts("Uncompressing Linux..."); putstr("Uncompressing Linux...");
gunzip(); gunzip();
puts("done.\n"); putstr("done.\n");
return 0; return 0;
} }
#endif #endif
......
...@@ -16,7 +16,7 @@ static __inline__ void putc(char c) ...@@ -16,7 +16,7 @@ static __inline__ void putc(char c)
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
putc(*s); putc(*s);
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
char c; char c;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
unsigned long tmp1, tmp2; unsigned long tmp1, tmp2;
__asm__ __volatile__( __asm__ __volatile__(
......
...@@ -29,7 +29,7 @@ static __inline__ void putc(char c) ...@@ -29,7 +29,7 @@ static __inline__ void putc(char c)
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
putc(*s); putc(*s);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
while ((*UART_TSR(EXC_UART00_BASE) & while ((*UART_TSR(EXC_UART00_BASE) &
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* This does not append a newline * This does not append a newline
*/ */
static void static void
puts(const char *s) putstr(const char *s)
{ {
unsigned long serial_port; unsigned long serial_port;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
while (AMBA_UART_FR & (1 << 5)); while (AMBA_UART_FR & (1 << 5));
......
...@@ -26,7 +26,7 @@ static __inline__ void putc(char c) ...@@ -26,7 +26,7 @@ static __inline__ void putc(char c)
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
putc(*s); putc(*s);
......
...@@ -37,7 +37,7 @@ static __inline__ void putc(char c) ...@@ -37,7 +37,7 @@ static __inline__ void putc(char c)
*UARTDR = c; *UARTDR = c;
} }
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) while (*s)
{ {
......
...@@ -32,7 +32,7 @@ static __inline__ void putc(char c) ...@@ -32,7 +32,7 @@ static __inline__ void putc(char c)
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) while (*s)
{ {
......
...@@ -23,7 +23,7 @@ static __inline__ void putc(char c) ...@@ -23,7 +23,7 @@ static __inline__ void putc(char c)
__raw_writeb(c, IO_UART + 0x00); __raw_writeb(c, IO_UART + 0x00);
} }
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
if (*s == 10) { /* If a LF, add CR */ if (*s == 10) { /* If a LF, add CR */
......
...@@ -29,7 +29,7 @@ static __inline__ void putc (char ch) ...@@ -29,7 +29,7 @@ static __inline__ void putc (char ch)
UART_DATA = ch; UART_DATA = ch;
} }
static void puts (const char* sz) static void putstr (const char* sz)
{ {
for (; *sz; ++sz) { for (; *sz; ++sz) {
putc (*sz); putc (*sz);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
static void static void
puts(const char *s) putstr(const char *s)
{ {
volatile u8 * uart = 0; volatile u8 * uart = 0;
int shift = 0; int shift = 0;
......
...@@ -25,7 +25,7 @@ static __inline__ void putc(char c) ...@@ -25,7 +25,7 @@ static __inline__ void putc(char c)
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
putc(*s); putc(*s);
......
...@@ -67,7 +67,7 @@ extern struct param_struct params_phys; ...@@ -67,7 +67,7 @@ extern struct param_struct params_phys;
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
extern void ll_write_char(char *, char c, char white); extern void ll_write_char(char *, char c, char white);
int x,y; int x,y;
......
...@@ -100,7 +100,7 @@ putc(char ch) ...@@ -100,7 +100,7 @@ putc(char ch)
} }
static void static void
puts(const char *ptr) putstr(const char *ptr)
{ {
for (; *ptr != '\0'; ptr++) { for (; *ptr != '\0'; ptr++) {
putc(*ptr); putc(*ptr);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#define UART(x) (*(volatile unsigned long *)(serial_port + (x))) #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
static void puts( const char *s ) static void putstr( const char *s )
{ {
unsigned long serial_port; unsigned long serial_port;
......
...@@ -21,7 +21,7 @@ static __inline__ void putc(char c) ...@@ -21,7 +21,7 @@ static __inline__ void putc(char c)
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
putc(*s); putc(*s);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/* /*
* This does not append a newline * This does not append a newline
*/ */
static void puts(const char *s) static void putstr(const char *s)
{ {
while (*s) { while (*s) {
while (AMBA_UART_FR & (1 << 5)) while (AMBA_UART_FR & (1 << 5))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment