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)
init_mm.brk = (unsigned long) 0;
#if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) && defined(CONFIG_GDB_MAGICPRINT)
register_console(&gdb_console);
register_console((struct console *)&gdb_console);
#endif
printk("\r\n\nuClinux " CPU "\n");
......
......@@ -156,7 +156,7 @@ void mem_init(void)
/* DAVIDM look at setup memory map generically with reserved area */
unsigned long tmp;
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 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 */
......
......@@ -31,7 +31,7 @@ extern int request_irq_boot(unsigned int,
#include <asm/regs306x.h>
#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(0x00,_8TCSR2);
......@@ -62,7 +62,7 @@ void platform_timer_eoi(void)
#define GRA 0x00ffff6a
#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 *)TCNT=0;
......
......@@ -89,21 +89,21 @@ static __inline__ int test_bit(int nr, const unsigned long* addr)
case BIT: \
__asm__("stc ccr,%w1\n\t" \
"orc #0x80,ccr\n\t" \
"bld #" #BIT ",@%3\n\t" \
OP " #" #BIT ",@%3\n\t" \
"bld #" #BIT ",@%4\n\t" \
OP " #" #BIT ",@%4\n\t" \
"rotxl.l %0\n\t" \
"ldc %w1,ccr" \
: "=r"(retval),"=&r"(ccrsave) \
: "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr) \
: "memory"); \
break;
#define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \
case BIT: \
__asm__("bld #" #BIT ",@%2\n\t" \
OP " #" #BIT ",@%2\n\t" \
__asm__("bld #" #BIT ",@%3\n\t" \
OP " #" #BIT ",@%3\n\t" \
"rotxl.l %0\n\t" \
: "=r"(retval) \
: "=r"(retval),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr) \
: "memory"); \
break;
......@@ -129,13 +129,13 @@ static __inline__ int FNNAME(int nr, volatile void * addr) \
} else { \
__asm__("stc ccr,%w1\n\t" \
"orc #0x80,ccr\n\t" \
"btst %w4,@%3\n\t" \
OP " %w4,@%3\n\t" \
"btst %w5,@%4\n\t" \
OP " %w5,@%4\n\t" \
"beq 1f\n\t" \
"inc.l #1,%0\n" \
"1:\n\t" \
"ldc %w1,ccr" \
: "=r"(retval),"=&r"(ccrsave) \
: "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr),"r"(nr) \
: "memory"); \
} \
......@@ -159,12 +159,12 @@ static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \
H8300_GEN_TEST_BITOP_CONST(OP,7) \
} \
} else { \
__asm__("btst %w3,@%2\n\t" \
OP " %w3,@%2\n\t" \
__asm__("btst %w4,@%3\n\t" \
OP " %w4,@%3\n\t" \
"beq 1f\n\t" \
"inc.l #1,%0\n" \
"1:" \
: "=r"(retval) \
: "=r"(retval),"=m"(*b_addr) \
: "0" (retval),"r" (b_addr),"r"(nr) \
: "memory"); \
} \
......@@ -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)
{
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 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