Commit 8c225dbc authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] H8/300 some error/warning fix

Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bc8b70fc
...@@ -107,7 +107,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ...@@ -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. */ /* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: { case PTRACE_PEEKUSR: {
unsigned long tmp; unsigned long tmp = 0;
if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) { if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) {
ret = -EIO; ret = -EIO;
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
of the assembly has to go. */ of the assembly has to go. */
#include <net/checksum.h> #include <net/checksum.h>
#include <linux/module.h>
static inline unsigned short from32to16(unsigned long x) static inline unsigned short from32to16(unsigned long x)
{ {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192 /* Timer input freq. */ #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 */ /* setup 8bit timer ch2 */
ctrl_outb(H8300_TIMER_FREQ / HZ, TCORA2); /* set interval */ ctrl_outb(H8300_TIMER_FREQ / HZ, TCORA2); /* set interval */
...@@ -69,7 +69,7 @@ void platform_timer_eoi(void) ...@@ -69,7 +69,7 @@ void platform_timer_eoi(void)
#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8 /* Timer input freq. */ #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 *)GRA= H8300_TIMER_FREQ / HZ; /* set interval */
*(unsigned short *)TCNT=0; /* clear counter */ *(unsigned short *)TCNT=0; /* clear counter */
......
...@@ -273,6 +273,8 @@ static __inline__ unsigned long find_next_bit(const unsigned long *addr, ...@@ -273,6 +273,8 @@ static __inline__ unsigned long find_next_bit(const unsigned long *addr,
return result + __ffs(tmp); 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 * Every architecture must define this function. It's the fastest
* way of searching a 140-bit bitmap where the first 100 bits are * way of searching a 140-bit bitmap where the first 100 bits are
......
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