From 8c225dbc5a7b13801a8254aae0ccebab8e4bece7 Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Wed, 13 Oct 2004 07:31:45 -0700 Subject: [PATCH] [PATCH] H8/300 some error/warning fix Signed-off-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/h8300/kernel/ptrace.c | 2 +- arch/h8300/lib/checksum.c | 1 + arch/h8300/platform/h8300h/generic/timer.c | 4 ++-- include/asm-h8300/bitops.h | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c index f1189ccd9344f..b60d234d1d276 100644 --- a/arch/h8300/kernel/ptrace.c +++ b/arch/h8300/kernel/ptrace.c @@ -107,7 +107,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) /* read the word at location addr in the USER area. */ case PTRACE_PEEKUSR: { - unsigned long tmp; + unsigned long tmp = 0; if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) { ret = -EIO; diff --git a/arch/h8300/lib/checksum.c b/arch/h8300/lib/checksum.c index 6691d0b935b73..5aa688d9242de 100644 --- a/arch/h8300/lib/checksum.c +++ b/arch/h8300/lib/checksum.c @@ -32,6 +32,7 @@ of the assembly has to go. */ #include +#include static inline unsigned short from32to16(unsigned long x) { diff --git a/arch/h8300/platform/h8300h/generic/timer.c b/arch/h8300/platform/h8300h/generic/timer.c index ffc0349b74f9d..6590f89e521a8 100644 --- a/arch/h8300/platform/h8300h/generic/timer.c +++ b/arch/h8300/platform/h8300h/generic/timer.c @@ -32,7 +32,7 @@ #define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192 /* Timer input freq. */ -int platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *)) +void __init platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *)) { /* setup 8bit timer ch2 */ ctrl_outb(H8300_TIMER_FREQ / HZ, TCORA2); /* set interval */ @@ -69,7 +69,7 @@ void platform_timer_eoi(void) #define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8 /* Timer input freq. */ -int platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *)) +void __init platform_timer_setup(irqreturn_t (*timer_int)(int, void *, struct pt_regs *)) { *(unsigned short *)GRA= H8300_TIMER_FREQ / HZ; /* set interval */ *(unsigned short *)TCNT=0; /* clear counter */ diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h index 893e6f1c7efd5..94b7a46a6043e 100644 --- a/include/asm-h8300/bitops.h +++ b/include/asm-h8300/bitops.h @@ -273,6 +273,8 @@ found_middle: return result + __ffs(tmp); } +#define find_first_bit(addr, size) find_next_bit(addr, size, 0) + /* * Every architecture must define this function. It's the fastest * way of searching a 140-bit bitmap where the first 100 bits are -- 2.53.0