aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-09-04 05:53:58 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-09-07 21:35:04 -0400
commitfa43972fab24a3c050e880a7831f9378c6cebc0b (patch)
tree35d51e6a0ac6556f82d843506e8317854dc3192c
parent7d96169cb769f459dd6730b06fa3a88cb0c9297d (diff)
sh: fixup many sparse errors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boot/compressed/misc_32.c2
-rw-r--r--arch/sh/include/asm/clock.h1
-rw-r--r--arch/sh/include/asm/io.h4
-rw-r--r--arch/sh/include/asm/irq.h3
-rw-r--r--arch/sh/include/asm/processor.h4
-rw-r--r--arch/sh/include/asm/processor_32.h3
-rw-r--r--arch/sh/include/asm/processor_64.h2
-rw-r--r--arch/sh/include/asm/rtc.h1
-rw-r--r--arch/sh/include/asm/setup.h2
-rw-r--r--arch/sh/include/asm/syscalls.h25
-rw-r--r--arch/sh/include/asm/syscalls_32.h56
-rw-r--r--arch/sh/include/asm/syscalls_64.h34
-rw-r--r--arch/sh/include/asm/system.h6
-rw-r--r--arch/sh/include/asm/system_32.h16
-rw-r--r--arch/sh/kernel/cpu/clock.c5
-rw-r--r--arch/sh/kernel/io_generic.c6
-rw-r--r--arch/sh/kernel/machvec.c1
-rw-r--r--arch/sh/kernel/process_32.c1
-rw-r--r--arch/sh/kernel/process_64.c1
-rw-r--r--arch/sh/kernel/ptrace_32.c6
-rw-r--r--arch/sh/kernel/ptrace_64.c1
-rw-r--r--arch/sh/kernel/setup.c1
-rw-r--r--arch/sh/kernel/signal_32.c10
-rw-r--r--arch/sh/kernel/sys_sh.c7
-rw-r--r--arch/sh/kernel/sys_sh32.c5
-rw-r--r--arch/sh/kernel/time_32.c1
-rw-r--r--arch/sh/kernel/timers/timer-cmt.c2
-rw-r--r--arch/sh/kernel/traps_32.c68
-rw-r--r--arch/sh/lib/div64-generic.c1
-rw-r--r--arch/sh/mm/consistent.c2
-rw-r--r--arch/sh/mm/pg-nommu.c1
-rw-r--r--arch/sh/mm/tlb-nommu.c1
-rw-r--r--drivers/serial/sh-sci.c2
33 files changed, 220 insertions, 61 deletions
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc_32.c
index f386997e4d9c..efdba6b29572 100644
--- a/arch/sh/boot/compressed/misc_32.c
+++ b/arch/sh/boot/compressed/misc_32.c
@@ -191,7 +191,7 @@ long* stack_start = &user_stack[STACK_SIZE];
191 191
192void decompress_kernel(void) 192void decompress_kernel(void)
193{ 193{
194 output_data = 0; 194 output_data = NULL;
195 output_ptr = PHYSADDR((unsigned long)&_text+PAGE_SIZE); 195 output_ptr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
196#ifdef CONFIG_29BIT 196#ifdef CONFIG_29BIT
197 output_ptr |= P2SEG; 197 output_ptr |= P2SEG;
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h
index 720dfab7b15e..f9c88583d90a 100644
--- a/arch/sh/include/asm/clock.h
+++ b/arch/sh/include/asm/clock.h
@@ -39,6 +39,7 @@ struct clk {
39 39
40/* Should be defined by processor-specific code */ 40/* Should be defined by processor-specific code */
41void arch_init_clk_ops(struct clk_ops **, int type); 41void arch_init_clk_ops(struct clk_ops **, int type);
42int __init arch_clk_init(void);
42 43
43/* arch/sh/kernel/cpu/clock.c */ 44/* arch/sh/kernel/cpu/clock.c */
44int clk_init(void); 45int clk_init(void);
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index a4fbf0c84fb1..e49cfee95fb2 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -194,6 +194,8 @@ __BUILD_MEMORY_STRING(w, u16)
194 194
195#define IO_SPACE_LIMIT 0xffffffff 195#define IO_SPACE_LIMIT 0xffffffff
196 196
197extern unsigned long generic_io_base;
198
197/* 199/*
198 * This function provides a method for the generic case where a board-specific 200 * This function provides a method for the generic case where a board-specific
199 * ioport_map simply needs to return the port + some arbitrary port base. 201 * ioport_map simply needs to return the port + some arbitrary port base.
@@ -203,8 +205,6 @@ __BUILD_MEMORY_STRING(w, u16)
203 */ 205 */
204static inline void __set_io_port_base(unsigned long pbase) 206static inline void __set_io_port_base(unsigned long pbase)
205{ 207{
206 extern unsigned long generic_io_base;
207
208 generic_io_base = pbase; 208 generic_io_base = pbase;
209} 209}
210 210
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h
index 6195a531c1b0..d319baaf4fbd 100644
--- a/arch/sh/include/asm/irq.h
+++ b/arch/sh/include/asm/irq.h
@@ -41,6 +41,9 @@ static inline int generic_irq_demux(int irq)
41#define irq_canonicalize(irq) (irq) 41#define irq_canonicalize(irq) (irq)
42#define irq_demux(irq) sh_mv.mv_irq_demux(irq) 42#define irq_demux(irq) sh_mv.mv_irq_demux(irq)
43 43
44void init_IRQ(void);
45asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs);
46
44#ifdef CONFIG_IRQSTACKS 47#ifdef CONFIG_IRQSTACKS
45extern void irq_ctx_init(int cpu); 48extern void irq_ctx_init(int cpu);
46extern void irq_ctx_exit(int cpu); 49extern void irq_ctx_exit(int cpu);
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index 15d9f92ca383..58e2be55ab93 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -45,9 +45,13 @@ enum cpu_type {
45 45
46/* Forward decl */ 46/* Forward decl */
47struct sh_cpuinfo; 47struct sh_cpuinfo;
48struct seq_operations;
49
50extern struct pt_regs fake_swapper_regs;
48 51
49/* arch/sh/kernel/setup.c */ 52/* arch/sh/kernel/setup.c */
50const char *get_cpu_subtype(struct sh_cpuinfo *c); 53const char *get_cpu_subtype(struct sh_cpuinfo *c);
54extern const struct seq_operations cpuinfo_op;
51 55
52#ifdef CONFIG_VSYSCALL 56#ifdef CONFIG_VSYSCALL
53int vsyscall_init(void); 57int vsyscall_init(void);
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index 0dadd75bd93c..41d23210583c 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -10,6 +10,7 @@
10#ifdef __KERNEL__ 10#ifdef __KERNEL__
11 11
12#include <linux/compiler.h> 12#include <linux/compiler.h>
13#include <linux/linkage.h>
13#include <asm/page.h> 14#include <asm/page.h>
14#include <asm/types.h> 15#include <asm/types.h>
15#include <asm/cache.h> 16#include <asm/cache.h>
@@ -44,6 +45,8 @@ extern struct sh_cpuinfo cpu_data[];
44#define current_cpu_data cpu_data[smp_processor_id()] 45#define current_cpu_data cpu_data[smp_processor_id()]
45#define raw_current_cpu_data cpu_data[raw_smp_processor_id()] 46#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
46 47
48asmlinkage void __init sh_cpu_init(void);
49
47/* 50/*
48 * User space process size: 2GB. 51 * User space process size: 2GB.
49 * 52 *
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h
index 770d5169983b..16609bc11627 100644
--- a/arch/sh/include/asm/processor_64.h
+++ b/arch/sh/include/asm/processor_64.h
@@ -169,8 +169,6 @@ struct thread_struct {
169#define INIT_MMAP \ 169#define INIT_MMAP \
170{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } 170{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
171 171
172extern struct pt_regs fake_swapper_regs;
173
174#define INIT_THREAD { \ 172#define INIT_THREAD { \
175 .sp = sizeof(init_stack) + \ 173 .sp = sizeof(init_stack) + \
176 (long) &init_stack, \ 174 (long) &init_stack, \
diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h
index 1813f4202a24..f7b010d48af7 100644
--- a/arch/sh/include/asm/rtc.h
+++ b/arch/sh/include/asm/rtc.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_RTC_H 1#ifndef _ASM_RTC_H
2#define _ASM_RTC_H 2#define _ASM_RTC_H
3 3
4void time_init(void);
4extern void (*board_time_init)(void); 5extern void (*board_time_init)(void);
5extern void (*rtc_sh_get_time)(struct timespec *); 6extern void (*rtc_sh_get_time)(struct timespec *);
6extern int (*rtc_sh_set_time)(const time_t); 7extern int (*rtc_sh_set_time)(const time_t);
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h
index 55a2bd328d99..554f865075ca 100644
--- a/arch/sh/include/asm/setup.h
+++ b/arch/sh/include/asm/setup.h
@@ -1,6 +1,8 @@
1#ifndef _SH_SETUP_H 1#ifndef _SH_SETUP_H
2#define _SH_SETUP_H 2#define _SH_SETUP_H
3 3
4#include <asm/mmzone.h>
5
4#define COMMAND_LINE_SIZE 256 6#define COMMAND_LINE_SIZE 256
5 7
6#ifdef __KERNEL__ 8#ifdef __KERNEL__
diff --git a/arch/sh/include/asm/syscalls.h b/arch/sh/include/asm/syscalls.h
new file mode 100644
index 000000000000..c1e2b8deb837
--- /dev/null
+++ b/arch/sh/include/asm/syscalls.h
@@ -0,0 +1,25 @@
1#ifndef __ASM_SH_SYSCALLS_H
2#define __ASM_SH_SYSCALLS_H
3
4#ifdef __KERNEL__
5
6struct old_utsname;
7
8asmlinkage int old_mmap(unsigned long addr, unsigned long len,
9 unsigned long prot, unsigned long flags,
10 int fd, unsigned long off);
11asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
12 unsigned long prot, unsigned long flags,
13 unsigned long fd, unsigned long pgoff);
14asmlinkage int sys_ipc(uint call, int first, int second,
15 int third, void __user *ptr, long fifth);
16asmlinkage int sys_uname(struct old_utsname __user *name);
17
18#ifdef CONFIG_SUPERH32
19# include "syscalls_32.h"
20#else
21# include "syscalls_64.h"
22#endif
23
24#endif /* __KERNEL__ */
25#endif /* __ASM_SH_SYSCALLS_H */
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h
new file mode 100644
index 000000000000..104c5e686106
--- /dev/null
+++ b/arch/sh/include/asm/syscalls_32.h
@@ -0,0 +1,56 @@
1#ifndef __ASM_SH_SYSCALLS_32_H
2#define __ASM_SH_SYSCALLS_32_H
3
4#ifdef __KERNEL__
5
6#include <linux/compiler.h>
7#include <linux/linkage.h>
8#include <linux/types.h>
9
10struct pt_regs;
11
12asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
13 unsigned long r6, unsigned long r7,
14 struct pt_regs __regs);
15asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
16 unsigned long parent_tidptr,
17 unsigned long child_tidptr,
18 struct pt_regs __regs);
19asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
20 unsigned long r6, unsigned long r7,
21 struct pt_regs __regs);
22asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
23 char __user * __user *uenvp, unsigned long r7,
24 struct pt_regs __regs);
25asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
26 unsigned long r6, unsigned long r7,
27 struct pt_regs __regs);
28asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act,
29 struct old_sigaction __user *oact);
30asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
31 unsigned long r6, unsigned long r7,
32 struct pt_regs __regs);
33asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
34 unsigned long r6, unsigned long r7,
35 struct pt_regs __regs);
36asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
37 unsigned long r6, unsigned long r7,
38 struct pt_regs __regs);
39asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
40 unsigned long r6, unsigned long r7,
41 struct pt_regs __regs);
42asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf,
43 size_t count, long dummy, loff_t pos);
44asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf,
45 size_t count, long dummy, loff_t pos);
46asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
47 u32 len0, u32 len1, int advice);
48
49/* Misc syscall related bits */
50asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
51asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
52asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
53 unsigned long thread_info_flags);
54
55#endif /* __KERNEL__ */
56#endif /* __ASM_SH_SYSCALLS_32_H */
diff --git a/arch/sh/include/asm/syscalls_64.h b/arch/sh/include/asm/syscalls_64.h
new file mode 100644
index 000000000000..751fd8811364
--- /dev/null
+++ b/arch/sh/include/asm/syscalls_64.h
@@ -0,0 +1,34 @@
1#ifndef __ASM_SH_SYSCALLS_64_H
2#define __ASM_SH_SYSCALLS_64_H
3
4#ifdef __KERNEL__
5
6#include <linux/compiler.h>
7#include <linux/linkage.h>
8#include <linux/types.h>
9
10struct pt_regs;
11
12asmlinkage int sys_fork(unsigned long r2, unsigned long r3,
13 unsigned long r4, unsigned long r5,
14 unsigned long r6, unsigned long r7,
15 struct pt_regs *pregs);
16asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
17 unsigned long r4, unsigned long r5,
18 unsigned long r6, unsigned long r7,
19 struct pt_regs *pregs);
20asmlinkage int sys_vfork(unsigned long r2, unsigned long r3,
21 unsigned long r4, unsigned long r5,
22 unsigned long r6, unsigned long r7,
23 struct pt_regs *pregs);
24asmlinkage int sys_execve(char *ufilename, char **uargv,
25 char **uenvp, unsigned long r5,
26 unsigned long r6, unsigned long r7,
27 struct pt_regs *pregs);
28
29/* Misc syscall related bits */
30asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs);
31asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
32
33#endif /* __KERNEL__ */
34#endif /* __ASM_SH_SYSCALLS_64_H */
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h
index fbac113bbfbf..6160fe445161 100644
--- a/arch/sh/include/asm/system.h
+++ b/arch/sh/include/asm/system.h
@@ -127,6 +127,8 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
127 }) 127 })
128 128
129extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); 129extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn));
130void free_initmem(void);
131void free_initrd_mem(unsigned long start, unsigned long end);
130 132
131extern void *set_exception_table_vec(unsigned int vec, void *handler); 133extern void *set_exception_table_vec(unsigned int vec, void *handler);
132 134
@@ -179,8 +181,8 @@ BUILD_TRAP_HANDLER(fpu_state_restore);
179#define arch_align_stack(x) (x) 181#define arch_align_stack(x) (x)
180 182
181struct mem_access { 183struct mem_access {
182 unsigned long (*from)(void *dst, const void *src, unsigned long cnt); 184 unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt);
183 unsigned long (*to)(void *dst, const void *src, unsigned long cnt); 185 unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt);
184}; 186};
185 187
186#ifdef CONFIG_SUPERH32 188#ifdef CONFIG_SUPERH32
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index f11bcf0855ed..16509ed2bb60 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -99,4 +99,20 @@ do { \
99int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, 99int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs,
100 struct mem_access *ma); 100 struct mem_access *ma);
101 101
102asmlinkage void do_address_error(struct pt_regs *regs,
103 unsigned long writeaccess,
104 unsigned long address);
105asmlinkage void do_divide_error(unsigned long r4, unsigned long r5,
106 unsigned long r6, unsigned long r7,
107 struct pt_regs __regs);
108asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5,
109 unsigned long r6, unsigned long r7,
110 struct pt_regs __regs);
111asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,
112 unsigned long r6, unsigned long r7,
113 struct pt_regs __regs);
114asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
115 unsigned long r6, unsigned long r7,
116 struct pt_regs __regs);
117
102#endif /* __ASM_SH_SYSTEM_32_H */ 118#endif /* __ASM_SH_SYSTEM_32_H */
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index f5eb56e6bc59..b7e46d5bba43 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -294,9 +294,10 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
294{ 294{
295} 295}
296 296
297void __init __attribute__ ((weak)) 297int __init __attribute__ ((weak))
298arch_clk_init(void) 298arch_clk_init(void)
299{ 299{
300 return 0;
300} 301}
301 302
302static int show_clocks(char *buf, char **start, off_t off, 303static int show_clocks(char *buf, char **start, off_t off,
@@ -331,7 +332,7 @@ int __init clk_init(void)
331 ret |= clk_register(clk); 332 ret |= clk_register(clk);
332 } 333 }
333 334
334 arch_clk_init(); 335 ret |= arch_clk_init();
335 336
336 /* Kick the child clocks.. */ 337 /* Kick the child clocks.. */
337 propagate_rate(&master_clk); 338 propagate_rate(&master_clk);
diff --git a/arch/sh/kernel/io_generic.c b/arch/sh/kernel/io_generic.c
index db769449f5a7..f1b214d3bce3 100644
--- a/arch/sh/kernel/io_generic.c
+++ b/arch/sh/kernel/io_generic.c
@@ -81,7 +81,7 @@ void generic_insb(unsigned long port, void *dst, unsigned long count)
81 volatile u8 *port_addr; 81 volatile u8 *port_addr;
82 u8 *buf = dst; 82 u8 *buf = dst;
83 83
84 port_addr = (volatile u8 *)__ioport_map(port, 1); 84 port_addr = (volatile u8 __force *)__ioport_map(port, 1);
85 while (count--) 85 while (count--)
86 *buf++ = *port_addr; 86 *buf++ = *port_addr;
87} 87}
@@ -91,7 +91,7 @@ void generic_insw(unsigned long port, void *dst, unsigned long count)
91 volatile u16 *port_addr; 91 volatile u16 *port_addr;
92 u16 *buf = dst; 92 u16 *buf = dst;
93 93
94 port_addr = (volatile u16 *)__ioport_map(port, 2); 94 port_addr = (volatile u16 __force *)__ioport_map(port, 2);
95 while (count--) 95 while (count--)
96 *buf++ = *port_addr; 96 *buf++ = *port_addr;
97 97
@@ -103,7 +103,7 @@ void generic_insl(unsigned long port, void *dst, unsigned long count)
103 volatile u32 *port_addr; 103 volatile u32 *port_addr;
104 u32 *buf = dst; 104 u32 *buf = dst;
105 105
106 port_addr = (volatile u32 *)__ioport_map(port, 4); 106 port_addr = (volatile u32 __force *)__ioport_map(port, 4);
107 while (count--) 107 while (count--)
108 *buf++ = *port_addr; 108 *buf++ = *port_addr;
109 109
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index 129b2cfd18a8..8bfdd275e940 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -14,6 +14,7 @@
14#include <linux/string.h> 14#include <linux/string.h>
15#include <asm/machvec.h> 15#include <asm/machvec.h>
16#include <asm/sections.h> 16#include <asm/sections.h>
17#include <asm/setup.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <asm/irq.h> 19#include <asm/irq.h>
19 20
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 7326313bcfdb..914e543102df 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -26,6 +26,7 @@
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/ubc.h> 27#include <asm/ubc.h>
28#include <asm/fpu.h> 28#include <asm/fpu.h>
29#include <asm/syscalls.h>
29 30
30static int hlt_counter; 31static int hlt_counter;
31int ubc_usercnt = 0; 32int ubc_usercnt = 0;
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index b9dbd2d3b4a5..d0dddc438c0c 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -25,6 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/proc_fs.h> 26#include <linux/proc_fs.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <asm/syscalls.h>
28#include <asm/uaccess.h> 29#include <asm/uaccess.h>
29#include <asm/pgtable.h> 30#include <asm/pgtable.h>
30#include <asm/mmu_context.h> 31#include <asm/mmu_context.h>
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 035cb300d3dc..84bf3420597c 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -27,6 +27,7 @@
27#include <asm/system.h> 27#include <asm/system.h>
28#include <asm/processor.h> 28#include <asm/processor.h>
29#include <asm/mmu_context.h> 29#include <asm/mmu_context.h>
30#include <asm/syscalls.h>
30 31
31/* 32/*
32 * does not yet catch signals sent when the child dies. 33 * does not yet catch signals sent when the child dies.
@@ -105,6 +106,7 @@ void ptrace_disable(struct task_struct *child)
105long arch_ptrace(struct task_struct *child, long request, long addr, long data) 106long arch_ptrace(struct task_struct *child, long request, long addr, long data)
106{ 107{
107 struct user * dummy = NULL; 108 struct user * dummy = NULL;
109 unsigned long __user *datap = (unsigned long __user *)data;
108 int ret; 110 int ret;
109 111
110 switch (request) { 112 switch (request) {
@@ -133,7 +135,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
133 tmp = !!tsk_used_math(child); 135 tmp = !!tsk_used_math(child);
134 else 136 else
135 tmp = 0; 137 tmp = 0;
136 ret = put_user(tmp, (unsigned long __user *)data); 138 ret = put_user(tmp, datap);
137 break; 139 break;
138 } 140 }
139 141
@@ -202,7 +204,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
202 } 204 }
203 205
204 ret = 0; 206 ret = 0;
205 if (put_user(tmp, (unsigned long *) data)) { 207 if (put_user(tmp, datap)) {
206 ret = -EFAULT; 208 ret = -EFAULT;
207 break; 209 break;
208 } 210 }
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 9c6424892bd3..e15b099c1f06 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -35,6 +35,7 @@
35#include <asm/system.h> 35#include <asm/system.h>
36#include <asm/processor.h> 36#include <asm/processor.h>
37#include <asm/mmu_context.h> 37#include <asm/mmu_context.h>
38#include <asm/syscalls.h>
38#include <asm/fpu.h> 39#include <asm/fpu.h>
39 40
40/* This mask defines the bits of the SR which the user is not allowed to 41/* This mask defines the bits of the SR which the user is not allowed to
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index de832056bf1b..6d0899e890d0 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -26,6 +26,7 @@
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/debugfs.h> 27#include <linux/debugfs.h>
28#include <linux/crash_dump.h> 28#include <linux/crash_dump.h>
29#include <linux/mmzone.h>
29#include <asm/uaccess.h> 30#include <asm/uaccess.h>
30#include <asm/io.h> 31#include <asm/io.h>
31#include <asm/page.h> 32#include <asm/page.h>
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 51689d29ad45..345de2f1d53c 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -30,6 +30,7 @@
30#include <asm/uaccess.h> 30#include <asm/uaccess.h>
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/cacheflush.h> 32#include <asm/cacheflush.h>
33#include <asm/syscalls.h>
33#include <asm/fpu.h> 34#include <asm/fpu.h>
34 35
35#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 36#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -247,7 +248,6 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
247 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 248 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
248 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15]; 249 struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15];
249 sigset_t set; 250 sigset_t set;
250 stack_t st;
251 int r0; 251 int r0;
252 252
253 if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) 253 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
@@ -265,11 +265,9 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
265 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) 265 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0))
266 goto badframe; 266 goto badframe;
267 267
268 if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) 268 if (do_sigaltstack(&frame->uc.uc_stack, NULL,
269 regs->regs[15]) == -EFAULT)
269 goto badframe; 270 goto badframe;
270 /* It is more difficult to avoid calling this function than to
271 call it and ignore errors. */
272 do_sigaltstack((const stack_t __user *)&st, NULL, (unsigned long)frame);
273 271
274 return r0; 272 return r0;
275 273
@@ -429,7 +427,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
429 427
430 /* Create the ucontext. */ 428 /* Create the ucontext. */
431 err |= __put_user(0, &frame->uc.uc_flags); 429 err |= __put_user(0, &frame->uc.uc_flags);
432 err |= __put_user(0, &frame->uc.uc_link); 430 err |= __put_user(NULL, &frame->uc.uc_link);
433 err |= __put_user((void *)current->sas_ss_sp, 431 err |= __put_user((void *)current->sas_ss_sp,
434 &frame->uc.uc_stack.ss_sp); 432 &frame->uc.uc_stack.ss_sp);
435 err |= __put_user(sas_ss_flags(regs->regs[15]), 433 err |= __put_user(sas_ss_flags(regs->regs[15]),
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 9061b86d73fa..0dfb88925add 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -23,6 +23,7 @@
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/ipc.h> 24#include <linux/ipc.h>
25#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
26#include <asm/syscalls.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27#include <asm/unistd.h> 28#include <asm/unistd.h>
28 29
@@ -186,7 +187,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
186 union semun fourth; 187 union semun fourth;
187 if (!ptr) 188 if (!ptr)
188 return -EINVAL; 189 return -EINVAL;
189 if (get_user(fourth.__pad, (void * __user *) ptr)) 190 if (get_user(fourth.__pad, (void __user * __user *) ptr))
190 return -EFAULT; 191 return -EFAULT;
191 return sys_semctl (first, second, third, fourth); 192 return sys_semctl (first, second, third, fourth);
192 } 193 }
@@ -261,13 +262,13 @@ asmlinkage int sys_ipc(uint call, int first, int second,
261 return -EINVAL; 262 return -EINVAL;
262} 263}
263 264
264asmlinkage int sys_uname(struct old_utsname * name) 265asmlinkage int sys_uname(struct old_utsname __user *name)
265{ 266{
266 int err; 267 int err;
267 if (!name) 268 if (!name)
268 return -EFAULT; 269 return -EFAULT;
269 down_read(&uts_sem); 270 down_read(&uts_sem);
270 err = copy_to_user(name, utsname(), sizeof (*name)); 271 err = copy_to_user(name, utsname(), sizeof(*name));
271 up_read(&uts_sem); 272 up_read(&uts_sem);
272 return err?-EFAULT:0; 273 return err?-EFAULT:0;
273} 274}
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c
index f0aa5c398656..dbba1e1833d4 100644
--- a/arch/sh/kernel/sys_sh32.c
+++ b/arch/sh/kernel/sys_sh32.c
@@ -16,6 +16,7 @@
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/unistd.h> 18#include <asm/unistd.h>
19#include <asm/syscalls.h>
19 20
20/* 21/*
21 * sys_pipe() is the normal C calling standard for creating 22 * sys_pipe() is the normal C calling standard for creating
@@ -37,13 +38,13 @@ asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
37 return error; 38 return error;
38} 39}
39 40
40asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char * buf, 41asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf,
41 size_t count, long dummy, loff_t pos) 42 size_t count, long dummy, loff_t pos)
42{ 43{
43 return sys_pread64(fd, buf, count, pos); 44 return sys_pread64(fd, buf, count, pos);
44} 45}
45 46
46asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char * buf, 47asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf,
47 size_t count, long dummy, loff_t pos) 48 size_t count, long dummy, loff_t pos)
48{ 49{
49 return sys_pwrite64(fd, buf, count, pos); 50 return sys_pwrite64(fd, buf, count, pos);
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c
index e2f74cc71d8c..23ca711c27d2 100644
--- a/arch/sh/kernel/time_32.c
+++ b/arch/sh/kernel/time_32.c
@@ -16,6 +16,7 @@
16#include <linux/timex.h> 16#include <linux/timex.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
18#include <linux/clockchips.h> 18#include <linux/clockchips.h>
19#include <linux/mc146818rtc.h> /* for rtc_lock */
19#include <linux/smp.h> 20#include <linux/smp.h>
20#include <asm/clock.h> 21#include <asm/clock.h>
21#include <asm/rtc.h> 22#include <asm/rtc.h>
diff --git a/arch/sh/kernel/timers/timer-cmt.c b/arch/sh/kernel/timers/timer-cmt.c
index d20c8c375881..c127293271e1 100644
--- a/arch/sh/kernel/timers/timer-cmt.c
+++ b/arch/sh/kernel/timers/timer-cmt.c
@@ -174,7 +174,7 @@ static int cmt_timer_init(void)
174 return 0; 174 return 0;
175} 175}
176 176
177struct sys_timer_ops cmt_timer_ops = { 177static struct sys_timer_ops cmt_timer_ops = {
178 .init = cmt_timer_init, 178 .init = cmt_timer_init,
179 .start = cmt_timer_start, 179 .start = cmt_timer_start,
180 .stop = cmt_timer_stop, 180 .stop = cmt_timer_stop,
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 511a9426cec5..4901f6732162 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -192,6 +192,7 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
192 int ret, index, count; 192 int ret, index, count;
193 unsigned long *rm, *rn; 193 unsigned long *rm, *rn;
194 unsigned char *src, *dst; 194 unsigned char *src, *dst;
195 unsigned char __user *srcu, *dstu;
195 196
196 index = (instruction>>8)&15; /* 0x0F00 */ 197 index = (instruction>>8)&15; /* 0x0F00 */
197 rn = &regs->regs[index]; 198 rn = &regs->regs[index];
@@ -206,28 +207,28 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
206 case 0: /* mov.[bwl] to/from memory via r0+rn */ 207 case 0: /* mov.[bwl] to/from memory via r0+rn */
207 if (instruction & 8) { 208 if (instruction & 8) {
208 /* from memory */ 209 /* from memory */
209 src = (unsigned char*) *rm; 210 srcu = (unsigned char __user *)*rm;
210 src += regs->regs[0]; 211 srcu += regs->regs[0];
211 dst = (unsigned char*) rn; 212 dst = (unsigned char *)rn;
212 *(unsigned long*)dst = 0; 213 *(unsigned long *)dst = 0;
213 214
214#if !defined(__LITTLE_ENDIAN__) 215#if !defined(__LITTLE_ENDIAN__)
215 dst += 4-count; 216 dst += 4-count;
216#endif 217#endif
217 if (ma->from(dst, src, count)) 218 if (ma->from(dst, srcu, count))
218 goto fetch_fault; 219 goto fetch_fault;
219 220
220 sign_extend(count, dst); 221 sign_extend(count, dst);
221 } else { 222 } else {
222 /* to memory */ 223 /* to memory */
223 src = (unsigned char*) rm; 224 src = (unsigned char *)rm;
224#if !defined(__LITTLE_ENDIAN__) 225#if !defined(__LITTLE_ENDIAN__)
225 src += 4-count; 226 src += 4-count;
226#endif 227#endif
227 dst = (unsigned char*) *rn; 228 dstu = (unsigned char __user *)*rn;
228 dst += regs->regs[0]; 229 dstu += regs->regs[0];
229 230
230 if (ma->to(dst, src, count)) 231 if (ma->to(dstu, src, count))
231 goto fetch_fault; 232 goto fetch_fault;
232 } 233 }
233 ret = 0; 234 ret = 0;
@@ -235,10 +236,10 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
235 236
236 case 1: /* mov.l Rm,@(disp,Rn) */ 237 case 1: /* mov.l Rm,@(disp,Rn) */
237 src = (unsigned char*) rm; 238 src = (unsigned char*) rm;
238 dst = (unsigned char*) *rn; 239 dstu = (unsigned char __user *)*rn;
239 dst += (instruction&0x000F)<<2; 240 dstu += (instruction&0x000F)<<2;
240 241
241 if (ma->to(dst, src, 4)) 242 if (ma->to(dstu, src, 4))
242 goto fetch_fault; 243 goto fetch_fault;
243 ret = 0; 244 ret = 0;
244 break; 245 break;
@@ -247,28 +248,28 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
247 if (instruction & 4) 248 if (instruction & 4)
248 *rn -= count; 249 *rn -= count;
249 src = (unsigned char*) rm; 250 src = (unsigned char*) rm;
250 dst = (unsigned char*) *rn; 251 dstu = (unsigned char __user *)*rn;
251#if !defined(__LITTLE_ENDIAN__) 252#if !defined(__LITTLE_ENDIAN__)
252 src += 4-count; 253 src += 4-count;
253#endif 254#endif
254 if (ma->to(dst, src, count)) 255 if (ma->to(dstu, src, count))
255 goto fetch_fault; 256 goto fetch_fault;
256 ret = 0; 257 ret = 0;
257 break; 258 break;
258 259
259 case 5: /* mov.l @(disp,Rm),Rn */ 260 case 5: /* mov.l @(disp,Rm),Rn */
260 src = (unsigned char*) *rm; 261 srcu = (unsigned char __user *)*rm;
261 src += (instruction&0x000F)<<2; 262 srcu += (instruction & 0x000F) << 2;
262 dst = (unsigned char*) rn; 263 dst = (unsigned char *)rn;
263 *(unsigned long*)dst = 0; 264 *(unsigned long *)dst = 0;
264 265
265 if (ma->from(dst, src, 4)) 266 if (ma->from(dst, srcu, 4))
266 goto fetch_fault; 267 goto fetch_fault;
267 ret = 0; 268 ret = 0;
268 break; 269 break;
269 270
270 case 6: /* mov.[bwl] from memory, possibly with post-increment */ 271 case 6: /* mov.[bwl] from memory, possibly with post-increment */
271 src = (unsigned char*) *rm; 272 srcu = (unsigned char __user *)*rm;
272 if (instruction & 4) 273 if (instruction & 4)
273 *rm += count; 274 *rm += count;
274 dst = (unsigned char*) rn; 275 dst = (unsigned char*) rn;
@@ -277,7 +278,7 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
277#if !defined(__LITTLE_ENDIAN__) 278#if !defined(__LITTLE_ENDIAN__)
278 dst += 4-count; 279 dst += 4-count;
279#endif 280#endif
280 if (ma->from(dst, src, count)) 281 if (ma->from(dst, srcu, count))
281 goto fetch_fault; 282 goto fetch_fault;
282 sign_extend(count, dst); 283 sign_extend(count, dst);
283 ret = 0; 284 ret = 0;
@@ -286,28 +287,28 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs,
286 case 8: 287 case 8:
287 switch ((instruction&0xFF00)>>8) { 288 switch ((instruction&0xFF00)>>8) {
288 case 0x81: /* mov.w R0,@(disp,Rn) */ 289 case 0x81: /* mov.w R0,@(disp,Rn) */
289 src = (unsigned char*) &regs->regs[0]; 290 src = (unsigned char *) &regs->regs[0];
290#if !defined(__LITTLE_ENDIAN__) 291#if !defined(__LITTLE_ENDIAN__)
291 src += 2; 292 src += 2;
292#endif 293#endif
293 dst = (unsigned char*) *rm; /* called Rn in the spec */ 294 dstu = (unsigned char __user *)*rm; /* called Rn in the spec */
294 dst += (instruction&0x000F)<<1; 295 dstu += (instruction & 0x000F) << 1;
295 296
296 if (ma->to(dst, src, 2)) 297 if (ma->to(dstu, src, 2))
297 goto fetch_fault; 298 goto fetch_fault;
298 ret = 0; 299 ret = 0;
299 break; 300 break;
300 301
301 case 0x85: /* mov.w @(disp,Rm),R0 */ 302 case 0x85: /* mov.w @(disp,Rm),R0 */
302 src = (unsigned char*) *rm; 303 srcu = (unsigned char __user *)*rm;
303 src += (instruction&0x000F)<<1; 304 srcu += (instruction & 0x000F) << 1;
304 dst = (unsigned char*) &regs->regs[0]; 305 dst = (unsigned char *) &regs->regs[0];
305 *(unsigned long*)dst = 0; 306 *(unsigned long *)dst = 0;
306 307
307#if !defined(__LITTLE_ENDIAN__) 308#if !defined(__LITTLE_ENDIAN__)
308 dst += 2; 309 dst += 2;
309#endif 310#endif
310 if (ma->from(dst, src, 2)) 311 if (ma->from(dst, srcu, 2))
311 goto fetch_fault; 312 goto fetch_fault;
312 sign_extend(2, dst); 313 sign_extend(2, dst);
313 ret = 0; 314 ret = 0;
@@ -333,7 +334,8 @@ static inline int handle_delayslot(struct pt_regs *regs,
333 struct mem_access *ma) 334 struct mem_access *ma)
334{ 335{
335 opcode_t instruction; 336 opcode_t instruction;
336 void *addr = (void *)(regs->pc + instruction_size(old_instruction)); 337 void __user *addr = (void __user *)(regs->pc +
338 instruction_size(old_instruction));
337 339
338 if (copy_from_user(&instruction, addr, sizeof(instruction))) { 340 if (copy_from_user(&instruction, addr, sizeof(instruction))) {
339 /* the instruction-fetch faulted */ 341 /* the instruction-fetch faulted */
@@ -559,7 +561,7 @@ asmlinkage void do_address_error(struct pt_regs *regs,
559 } 561 }
560 562
561 set_fs(USER_DS); 563 set_fs(USER_DS);
562 if (copy_from_user(&instruction, (void *)(regs->pc), 564 if (copy_from_user(&instruction, (void __user *)(regs->pc),
563 sizeof(instruction))) { 565 sizeof(instruction))) {
564 /* Argh. Fault on the instruction itself. 566 /* Argh. Fault on the instruction itself.
565 This should never happen non-SMP 567 This should never happen non-SMP
@@ -589,7 +591,7 @@ uspace_segv:
589 die("unaligned program counter", regs, error_code); 591 die("unaligned program counter", regs, error_code);
590 592
591 set_fs(KERNEL_DS); 593 set_fs(KERNEL_DS);
592 if (copy_from_user(&instruction, (void *)(regs->pc), 594 if (copy_from_user(&instruction, (void __user *)(regs->pc),
593 sizeof(instruction))) { 595 sizeof(instruction))) {
594 /* Argh. Fault on the instruction itself. 596 /* Argh. Fault on the instruction itself.
595 This should never happen non-SMP 597 This should never happen non-SMP
diff --git a/arch/sh/lib/div64-generic.c b/arch/sh/lib/div64-generic.c
index 4bef3b5d964a..60e76aa8b53e 100644
--- a/arch/sh/lib/div64-generic.c
+++ b/arch/sh/lib/div64-generic.c
@@ -3,6 +3,7 @@
3 */ 3 */
4 4
5#include <linux/types.h> 5#include <linux/types.h>
6#include <asm/div64.h>
6 7
7extern uint64_t __xdiv64_32(u64 n, u32 d); 8extern uint64_t __xdiv64_32(u64 n, u32 d);
8 9
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 64b8f7f96f9a..7619a0fae086 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -44,7 +44,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
44 */ 44 */
45 dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL); 45 dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL);
46 46
47 ret_nocache = ioremap_nocache(virt_to_phys(ret), size); 47 ret_nocache = (void __force *)ioremap_nocache(virt_to_phys(ret), size);
48 if (!ret_nocache) { 48 if (!ret_nocache) {
49 free_pages((unsigned long)ret, order); 49 free_pages((unsigned long)ret, order);
50 return NULL; 50 return NULL;
diff --git a/arch/sh/mm/pg-nommu.c b/arch/sh/mm/pg-nommu.c
index 677dd57f0877..91ed4e695ff7 100644
--- a/arch/sh/mm/pg-nommu.c
+++ b/arch/sh/mm/pg-nommu.c
@@ -13,6 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/string.h> 14#include <linux/string.h>
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/uaccess.h>
16 17
17void copy_page(void *to, void *from) 18void copy_page(void *to, void *from)
18{ 19{
diff --git a/arch/sh/mm/tlb-nommu.c b/arch/sh/mm/tlb-nommu.c
index 15111bc7ddd6..71c742b5aee3 100644
--- a/arch/sh/mm/tlb-nommu.c
+++ b/arch/sh/mm/tlb-nommu.c
@@ -10,6 +10,7 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <asm/pgtable.h> 12#include <asm/pgtable.h>
13#include <asm/tlbflush.h>
13 14
14/* 15/*
15 * Nothing too terribly exciting here .. 16 * Nothing too terribly exciting here ..
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 3df2aaec829f..f5aebc9f27e7 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1113,7 +1113,7 @@ static const char *sci_type(struct uart_port *port)
1113 case PORT_IRDA: return "irda"; 1113 case PORT_IRDA: return "irda";
1114 } 1114 }
1115 1115
1116 return 0; 1116 return NULL;
1117} 1117}
1118 1118
1119static void sci_release_port(struct uart_port *port) 1119static void sci_release_port(struct uart_port *port)