Commit 893829b6 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] H8/300: fix waring

- fix gcc-3.4.0 warnings
parent 197170b1
...@@ -135,7 +135,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -135,7 +135,7 @@ void __init setup_arch(char **cmdline_p)
init_mm.brk = (unsigned long) 0; init_mm.brk = (unsigned long) 0;
#if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT) #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT)
register_console(&gdb_console); register_console((struct console *)&gdb_console);
#endif #endif
printk("\r\n\nuClinux " CPU "\n"); printk("\r\n\nuClinux " CPU "\n");
......
...@@ -156,7 +156,7 @@ void mem_init(void) ...@@ -156,7 +156,7 @@ void mem_init(void)
/* DAVIDM look at setup memory map generically with reserved area */ /* DAVIDM look at setup memory map generically with reserved area */
unsigned long tmp; unsigned long tmp;
extern char _etext, _stext, _sdata, _ebss, __init_begin, __init_end; extern char _etext, _stext, _sdata, _ebss, __init_begin, __init_end;
extern unsigned char _ramend, _ramstart; extern unsigned long _ramend, _ramstart;
unsigned long len = &_ramend - &_ramstart; unsigned long len = &_ramend - &_ramstart;
unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */ unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */
unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */ unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */
......
...@@ -31,7 +31,7 @@ extern int request_irq_boot(unsigned int, ...@@ -31,7 +31,7 @@ extern int request_irq_boot(unsigned int,
#include <asm/regs306x.h> #include <asm/regs306x.h>
#define CMFA 6 #define CMFA 6
int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *)) int platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *))
{ {
ctrl_outb(H8300_TIMER_COUNT_DATA,TCORA2); ctrl_outb(H8300_TIMER_COUNT_DATA,TCORA2);
ctrl_outb(0x00,_8TCSR2); ctrl_outb(0x00,_8TCSR2);
...@@ -62,7 +62,7 @@ void platform_timer_eoi(void) ...@@ -62,7 +62,7 @@ void platform_timer_eoi(void)
#define GRA 0x00ffff6a #define GRA 0x00ffff6a
#define GRB 0x00ffff6c #define GRB 0x00ffff6c
int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *)) int platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *))
{ {
*(unsigned short *)GRA= H8300_TIMER_COUNT_DATA; *(unsigned short *)GRA= H8300_TIMER_COUNT_DATA;
*(unsigned short *)TCNT=0; *(unsigned short *)TCNT=0;
......
...@@ -89,21 +89,21 @@ static __inline__ int test_bit(int nr, const unsigned long* addr) ...@@ -89,21 +89,21 @@ static __inline__ int test_bit(int nr, const unsigned long* addr)
case BIT: \ case BIT: \
__asm__("stc ccr,%w1\n\t" \ __asm__("stc ccr,%w1\n\t" \
"orc #0x80,ccr\n\t" \ "orc #0x80,ccr\n\t" \
"bld #" #BIT ",@%3\n\t" \ "bld #" #BIT ",@%4\n\t" \
OP " #" #BIT ",@%3\n\t" \ OP " #" #BIT ",@%4\n\t" \
"rotxl.l %0\n\t" \ "rotxl.l %0\n\t" \
"ldc %w1,ccr" \ "ldc %w1,ccr" \
: "=r"(retval),"=&r"(ccrsave) \ : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr) \ : "0" (retval),"r" (b_addr) \
: "memory"); \ : "memory"); \
break; break;
#define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \ #define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \
case BIT: \ case BIT: \
__asm__("bld #" #BIT ",@%2\n\t" \ __asm__("bld #" #BIT ",@%3\n\t" \
OP " #" #BIT ",@%2\n\t" \ OP " #" #BIT ",@%3\n\t" \
"rotxl.l %0\n\t" \ "rotxl.l %0\n\t" \
: "=r"(retval) \ : "=r"(retval),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr) \ : "0" (retval),"r" (b_addr) \
: "memory"); \ : "memory"); \
break; break;
...@@ -129,13 +129,13 @@ static __inline__ int FNNAME(int nr, volatile void * addr) \ ...@@ -129,13 +129,13 @@ static __inline__ int FNNAME(int nr, volatile void * addr) \
} else { \ } else { \
__asm__("stc ccr,%w1\n\t" \ __asm__("stc ccr,%w1\n\t" \
"orc #0x80,ccr\n\t" \ "orc #0x80,ccr\n\t" \
"btst %w4,@%3\n\t" \ "btst %w5,@%4\n\t" \
OP " %w4,@%3\n\t" \ OP " %w5,@%4\n\t" \
"beq 1f\n\t" \ "beq 1f\n\t" \
"inc.l #1,%0\n" \ "inc.l #1,%0\n" \
"1:\n\t" \ "1:\n\t" \
"ldc %w1,ccr" \ "ldc %w1,ccr" \
: "=r"(retval),"=&r"(ccrsave) \ : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr),"r"(nr) \ : "0" (retval),"r" (b_addr),"r"(nr) \
: "memory"); \ : "memory"); \
} \ } \
...@@ -159,12 +159,12 @@ static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \ ...@@ -159,12 +159,12 @@ static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \
H8300_GEN_TEST_BITOP_CONST(OP,7) \ H8300_GEN_TEST_BITOP_CONST(OP,7) \
} \ } \
} else { \ } else { \
__asm__("btst %w3,@%2\n\t" \ __asm__("btst %w4,@%3\n\t" \
OP " %w3,@%2\n\t" \ OP " %w4,@%3\n\t" \
"beq 1f\n\t" \ "beq 1f\n\t" \
"inc.l #1,%0\n" \ "inc.l #1,%0\n" \
"1:" \ "1:" \
: "=r"(retval) \ : "=r"(retval),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr),"r"(nr) \ : "0" (retval),"r" (b_addr),"r"(nr) \
: "memory"); \ : "memory"); \
} \ } \
...@@ -183,7 +183,7 @@ H8300_GEN_TEST_BITOP(test_and_change_bit,"bnot") ...@@ -183,7 +183,7 @@ H8300_GEN_TEST_BITOP(test_and_change_bit,"bnot")
static __inline__ int find_next_zero_bit (void * addr, int size, int offset) static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
{ {
unsigned long *p = ((unsigned long *) addr) + (offset >> 5); unsigned long *p = (unsigned long *)(((unsigned long)addr + (offset >> 3)) & ~3);
unsigned long result = offset & ~31UL; unsigned long result = offset & ~31UL;
unsigned long tmp; unsigned long tmp;
......
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