public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] H8/300 support update (3/4) - fix waring
@ 2004-03-14 16:28 Yoshinori Sato
  0 siblings, 0 replies; only message in thread
From: Yoshinori Sato @ 2004-03-14 16:28 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux kernel Mailing List

- fix gcc-3.4.0 warnings

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

diff -Nru -X .exclude-diff linux-2.6.4/arch/h8300/kernel/setup.c linux-2.6.4-h8300/arch/h8300/kernel/setup.c
--- linux-2.6.4/arch/h8300/kernel/setup.c	2004-01-09 15:59:09.000000000 +0900
+++ linux-2.6.4-h8300/arch/h8300/kernel/setup.c	2004-03-03 17:30:20.000000000 +0900
@@ -135,7 +135,7 @@
 	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");
diff -Nru -X .exclude-diff linux-2.6.4/arch/h8300/mm/init.c linux-2.6.4-h8300/arch/h8300/mm/init.c
--- linux-2.6.4/arch/h8300/mm/init.c	2004-01-09 15:59:41.000000000 +0900
+++ linux-2.6.4-h8300/arch/h8300/mm/init.c	2004-03-14 23:33:13.000000000 +0900
@@ -156,7 +156,7 @@
 	/* 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 */
diff -Nru -X .exclude-diff linux-2.6.4/arch/h8300/platform/h8300h/generic/timer.c linux-2.6.4-h8300/arch/h8300/platform/h8300h/generic/timer.c
--- linux-2.6.4/arch/h8300/platform/h8300h/generic/timer.c	2004-03-14 18:17:37.000000000 +0900
+++ linux-2.6.4-h8300/arch/h8300/platform/h8300h/generic/timer.c	2004-03-14 23:33:13.000000000 +0900
@@ -31,7 +31,7 @@
 #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 @@
 #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;
diff -Nru -X .exclude-diff linux-2.6.4/include/asm-h8300/bitops.h linux-2.6.4-h8300/include/asm-h8300/bitops.h
--- linux-2.6.4/include/asm-h8300/bitops.h	2004-02-20 01:08:06.000000000 +0900
+++ linux-2.6.4-h8300/include/asm-h8300/bitops.h	2004-03-14 23:33:13.000000000 +0900
@@ -89,21 +89,21 @@
 	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 @@
 	} 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 @@
 			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 @@
 
 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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-14 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-14 16:28 [PATCH] H8/300 support update (3/4) - fix waring Yoshinori Sato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox