diff options
| author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-02-05 15:16:47 -0500 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-02-05 15:16:47 -0500 |
| commit | 2b67fc46061b2171fb8fbb55d1ac717abd533569 (patch) | |
| tree | d4e9db6e7d51d2fc3cf782bf11e24ed7fbc544a0 /arch/s390/kernel | |
| parent | 55dff5224abeb734b12c1661c34ccf534955bee7 (diff) | |
[S390] Get rid of a lot of sparse warnings.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
| -rw-r--r-- | arch/s390/kernel/compat_exec_domain.c | 5 | ||||
| -rw-r--r-- | arch/s390/kernel/compat_linux.c | 18 | ||||
| -rw-r--r-- | arch/s390/kernel/compat_signal.c | 6 | ||||
| -rw-r--r-- | arch/s390/kernel/crash.c | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/debug.c | 18 | ||||
| -rw-r--r-- | arch/s390/kernel/ebcdic.c | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/kprobes.c | 3 | ||||
| -rw-r--r-- | arch/s390/kernel/machine_kexec.c | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/module.c | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/ptrace.c | 36 | ||||
| -rw-r--r-- | arch/s390/kernel/setup.c | 7 | ||||
| -rw-r--r-- | arch/s390/kernel/smp.c | 19 | ||||
| -rw-r--r-- | arch/s390/kernel/time.c | 4 | ||||
| -rw-r--r-- | arch/s390/kernel/traps.c | 13 | ||||
| -rw-r--r-- | arch/s390/kernel/vtime.c | 2 |
15 files changed, 63 insertions, 72 deletions
diff --git a/arch/s390/kernel/compat_exec_domain.c b/arch/s390/kernel/compat_exec_domain.c index 71d27c493568..914d49444f92 100644 --- a/arch/s390/kernel/compat_exec_domain.c +++ b/arch/s390/kernel/compat_exec_domain.c | |||
| @@ -12,10 +12,9 @@ | |||
| 12 | #include <linux/personality.h> | 12 | #include <linux/personality.h> |
| 13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
| 14 | 14 | ||
| 15 | struct exec_domain s390_exec_domain; | 15 | static struct exec_domain s390_exec_domain; |
| 16 | 16 | ||
| 17 | static int __init | 17 | static int __init s390_init (void) |
| 18 | s390_init (void) | ||
| 19 | { | 18 | { |
| 20 | s390_exec_domain.name = "Linux/s390"; | 19 | s390_exec_domain.name = "Linux/s390"; |
| 21 | s390_exec_domain.handler = NULL; | 20 | s390_exec_domain.handler = NULL; |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 5b33f823863a..cf84d697daed 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
| @@ -416,7 +416,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) | |||
| 416 | mm_segment_t old_fs = get_fs (); | 416 | mm_segment_t old_fs = get_fs (); |
| 417 | 417 | ||
| 418 | set_fs (KERNEL_DS); | 418 | set_fs (KERNEL_DS); |
| 419 | ret = sys_sysinfo((struct sysinfo __user *) &s); | 419 | ret = sys_sysinfo((struct sysinfo __force __user *) &s); |
| 420 | set_fs (old_fs); | 420 | set_fs (old_fs); |
| 421 | err = put_user (s.uptime, &info->uptime); | 421 | err = put_user (s.uptime, &info->uptime); |
| 422 | err |= __put_user (s.loads[0], &info->loads[0]); | 422 | err |= __put_user (s.loads[0], &info->loads[0]); |
| @@ -445,7 +445,8 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, | |||
| 445 | mm_segment_t old_fs = get_fs (); | 445 | mm_segment_t old_fs = get_fs (); |
| 446 | 446 | ||
| 447 | set_fs (KERNEL_DS); | 447 | set_fs (KERNEL_DS); |
| 448 | ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t); | 448 | ret = sys_sched_rr_get_interval(pid, |
| 449 | (struct timespec __force __user *) &t); | ||
| 449 | set_fs (old_fs); | 450 | set_fs (old_fs); |
| 450 | if (put_compat_timespec(&t, interval)) | 451 | if (put_compat_timespec(&t, interval)) |
| 451 | return -EFAULT; | 452 | return -EFAULT; |
| @@ -472,8 +473,8 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | |||
| 472 | } | 473 | } |
| 473 | set_fs (KERNEL_DS); | 474 | set_fs (KERNEL_DS); |
| 474 | ret = sys_rt_sigprocmask(how, | 475 | ret = sys_rt_sigprocmask(how, |
| 475 | set ? (sigset_t __user *) &s : NULL, | 476 | set ? (sigset_t __force __user *) &s : NULL, |
| 476 | oset ? (sigset_t __user *) &s : NULL, | 477 | oset ? (sigset_t __force __user *) &s : NULL, |
| 477 | sigsetsize); | 478 | sigsetsize); |
| 478 | set_fs (old_fs); | 479 | set_fs (old_fs); |
| 479 | if (ret) return ret; | 480 | if (ret) return ret; |
| @@ -499,7 +500,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, | |||
| 499 | mm_segment_t old_fs = get_fs(); | 500 | mm_segment_t old_fs = get_fs(); |
| 500 | 501 | ||
| 501 | set_fs (KERNEL_DS); | 502 | set_fs (KERNEL_DS); |
| 502 | ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize); | 503 | ret = sys_rt_sigpending((sigset_t __force __user *) &s, sigsetsize); |
| 503 | set_fs (old_fs); | 504 | set_fs (old_fs); |
| 504 | if (!ret) { | 505 | if (!ret) { |
| 505 | switch (_NSIG_WORDS) { | 506 | switch (_NSIG_WORDS) { |
| @@ -524,7 +525,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) | |||
| 524 | if (copy_siginfo_from_user32(&info, uinfo)) | 525 | if (copy_siginfo_from_user32(&info, uinfo)) |
| 525 | return -EFAULT; | 526 | return -EFAULT; |
| 526 | set_fs (KERNEL_DS); | 527 | set_fs (KERNEL_DS); |
| 527 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); | 528 | ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *) &info); |
| 528 | set_fs (old_fs); | 529 | set_fs (old_fs); |
| 529 | return ret; | 530 | return ret; |
| 530 | } | 531 | } |
| @@ -682,7 +683,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse | |||
| 682 | 683 | ||
| 683 | set_fs(KERNEL_DS); | 684 | set_fs(KERNEL_DS); |
| 684 | ret = sys_sendfile(out_fd, in_fd, | 685 | ret = sys_sendfile(out_fd, in_fd, |
| 685 | offset ? (off_t __user *) &of : NULL, count); | 686 | offset ? (off_t __force __user *) &of : NULL, count); |
| 686 | set_fs(old_fs); | 687 | set_fs(old_fs); |
| 687 | 688 | ||
| 688 | if (offset && put_user(of, offset)) | 689 | if (offset && put_user(of, offset)) |
| @@ -703,7 +704,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, | |||
| 703 | 704 | ||
| 704 | set_fs(KERNEL_DS); | 705 | set_fs(KERNEL_DS); |
| 705 | ret = sys_sendfile64(out_fd, in_fd, | 706 | ret = sys_sendfile64(out_fd, in_fd, |
| 706 | offset ? (loff_t __user *) &lof : NULL, count); | 707 | offset ? (loff_t __force __user *) &lof : NULL, |
| 708 | count); | ||
| 707 | set_fs(old_fs); | 709 | set_fs(old_fs); |
| 708 | 710 | ||
| 709 | if (offset && put_user(lof, offset)) | 711 | if (offset && put_user(lof, offset)) |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 861888ab8c13..8d17b2ab6f21 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
| @@ -275,8 +275,8 @@ sys32_sigaltstack(const stack_t32 __user *uss, stack_t32 __user *uoss, | |||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | set_fs (KERNEL_DS); | 277 | set_fs (KERNEL_DS); |
| 278 | ret = do_sigaltstack((stack_t __user *) (uss ? &kss : NULL), | 278 | ret = do_sigaltstack((stack_t __force __user *) (uss ? &kss : NULL), |
| 279 | (stack_t __user *) (uoss ? &koss : NULL), | 279 | (stack_t __force __user *) (uoss ? &koss : NULL), |
| 280 | regs->gprs[15]); | 280 | regs->gprs[15]); |
| 281 | set_fs (old_fs); | 281 | set_fs (old_fs); |
| 282 | 282 | ||
| @@ -401,7 +401,7 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs) | |||
| 401 | goto badframe; | 401 | goto badframe; |
| 402 | 402 | ||
| 403 | set_fs (KERNEL_DS); | 403 | set_fs (KERNEL_DS); |
| 404 | do_sigaltstack((stack_t __user *)&st, NULL, regs->gprs[15]); | 404 | do_sigaltstack((stack_t __force __user *)&st, NULL, regs->gprs[15]); |
| 405 | set_fs (old_fs); | 405 | set_fs (old_fs); |
| 406 | 406 | ||
| 407 | return regs->gprs[2]; | 407 | return regs->gprs[2]; |
diff --git a/arch/s390/kernel/crash.c b/arch/s390/kernel/crash.c index 926cceeae0fa..8cc7c9fa64f5 100644 --- a/arch/s390/kernel/crash.c +++ b/arch/s390/kernel/crash.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/threads.h> | 10 | #include <linux/threads.h> |
| 11 | #include <linux/kexec.h> | 11 | #include <linux/kexec.h> |
| 12 | #include <linux/reboot.h> | ||
| 12 | 13 | ||
| 13 | void machine_crash_shutdown(struct pt_regs *regs) | 14 | void machine_crash_shutdown(struct pt_regs *regs) |
| 14 | { | 15 | { |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index bb57bc0e3fc8..f4b62df02aa2 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
| @@ -120,7 +120,7 @@ struct debug_view debug_hex_ascii_view = { | |||
| 120 | NULL | 120 | NULL |
| 121 | }; | 121 | }; |
| 122 | 122 | ||
| 123 | struct debug_view debug_level_view = { | 123 | static struct debug_view debug_level_view = { |
| 124 | "level", | 124 | "level", |
| 125 | &debug_prolog_level_fn, | 125 | &debug_prolog_level_fn, |
| 126 | NULL, | 126 | NULL, |
| @@ -129,7 +129,7 @@ struct debug_view debug_level_view = { | |||
| 129 | NULL | 129 | NULL |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | struct debug_view debug_pages_view = { | 132 | static struct debug_view debug_pages_view = { |
| 133 | "pages", | 133 | "pages", |
| 134 | &debug_prolog_pages_fn, | 134 | &debug_prolog_pages_fn, |
| 135 | NULL, | 135 | NULL, |
| @@ -138,7 +138,7 @@ struct debug_view debug_pages_view = { | |||
| 138 | NULL | 138 | NULL |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | struct debug_view debug_flush_view = { | 141 | static struct debug_view debug_flush_view = { |
| 142 | "flush", | 142 | "flush", |
| 143 | NULL, | 143 | NULL, |
| 144 | NULL, | 144 | NULL, |
| @@ -156,14 +156,14 @@ struct debug_view debug_sprintf_view = { | |||
| 156 | NULL | 156 | NULL |
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| 159 | 159 | /* used by dump analysis tools to determine version of debug feature */ | |
| 160 | unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION; | 160 | unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION; |
| 161 | 161 | ||
| 162 | /* static globals */ | 162 | /* static globals */ |
| 163 | 163 | ||
| 164 | static debug_info_t *debug_area_first = NULL; | 164 | static debug_info_t *debug_area_first = NULL; |
| 165 | static debug_info_t *debug_area_last = NULL; | 165 | static debug_info_t *debug_area_last = NULL; |
| 166 | DECLARE_MUTEX(debug_lock); | 166 | static DECLARE_MUTEX(debug_lock); |
| 167 | 167 | ||
| 168 | static int initialized; | 168 | static int initialized; |
| 169 | 169 | ||
| @@ -905,7 +905,7 @@ static struct ctl_table s390dbf_dir_table[] = { | |||
| 905 | { .ctl_name = 0 } | 905 | { .ctl_name = 0 } |
| 906 | }; | 906 | }; |
| 907 | 907 | ||
| 908 | struct ctl_table_header *s390dbf_sysctl_header; | 908 | static struct ctl_table_header *s390dbf_sysctl_header; |
| 909 | 909 | ||
| 910 | void | 910 | void |
| 911 | debug_stop_all(void) | 911 | debug_stop_all(void) |
| @@ -1300,8 +1300,7 @@ out: | |||
| 1300 | * flushes debug areas | 1300 | * flushes debug areas |
| 1301 | */ | 1301 | */ |
| 1302 | 1302 | ||
| 1303 | void | 1303 | static void debug_flush(debug_info_t* id, int area) |
| 1304 | debug_flush(debug_info_t* id, int area) | ||
| 1305 | { | 1304 | { |
| 1306 | unsigned long flags; | 1305 | unsigned long flags; |
| 1307 | int i,j; | 1306 | int i,j; |
| @@ -1511,8 +1510,7 @@ out: | |||
| 1511 | /* | 1510 | /* |
| 1512 | * clean up module | 1511 | * clean up module |
| 1513 | */ | 1512 | */ |
| 1514 | void | 1513 | static void __exit debug_exit(void) |
| 1515 | __exit debug_exit(void) | ||
| 1516 | { | 1514 | { |
| 1517 | debugfs_remove(debug_debugfs_root_entry); | 1515 | debugfs_remove(debug_debugfs_root_entry); |
| 1518 | unregister_sysctl_table(s390dbf_sysctl_header); | 1516 | unregister_sysctl_table(s390dbf_sysctl_header); |
diff --git a/arch/s390/kernel/ebcdic.c b/arch/s390/kernel/ebcdic.c index bb0f973137f0..cc0dc609d738 100644 --- a/arch/s390/kernel/ebcdic.c +++ b/arch/s390/kernel/ebcdic.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
| 14 | #include <asm/ebcdic.h> | ||
| 14 | 15 | ||
| 15 | /* | 16 | /* |
| 16 | * ASCII (IBM PC 437) -> EBCDIC 037 | 17 | * ASCII (IBM PC 437) -> EBCDIC 037 |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 576368c4f605..70db60cbe480 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
| @@ -365,7 +365,8 @@ void __kprobes kretprobe_trampoline_holder(void) | |||
| 365 | /* | 365 | /* |
| 366 | * Called when the probe at kretprobe trampoline is hit | 366 | * Called when the probe at kretprobe trampoline is hit |
| 367 | */ | 367 | */ |
| 368 | int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | 368 | static int __kprobes trampoline_probe_handler(struct kprobe *p, |
| 369 | struct pt_regs *regs) | ||
| 369 | { | 370 | { |
| 370 | struct kretprobe_instance *ri = NULL; | 371 | struct kretprobe_instance *ri = NULL; |
| 371 | struct hlist_head *head, empty_rp; | 372 | struct hlist_head *head, empty_rp; |
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index f6d9bcc0f75b..52f57af252b4 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
| 12 | #include <linux/kexec.h> | 12 | #include <linux/kexec.h> |
| 13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
| 14 | #include <linux/reboot.h> | ||
| 14 | #include <asm/cio.h> | 15 | #include <asm/cio.h> |
| 15 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
| 16 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index d989ed45a7aa..f5476f5c2e96 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
| 31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
| 32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
| 33 | #include <linux/moduleloader.h> | ||
| 33 | 34 | ||
| 34 | #if 0 | 35 | #if 0 |
| 35 | #define DEBUGP printk | 36 | #define DEBUGP printk |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 8f36504075ed..29fde70090fe 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
| @@ -86,15 +86,13 @@ FixPerRegisters(struct task_struct *task) | |||
| 86 | per_info->control_regs.bits.storage_alt_space_ctl = 0; | 86 | per_info->control_regs.bits.storage_alt_space_ctl = 0; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | void | 89 | static void set_single_step(struct task_struct *task) |
| 90 | set_single_step(struct task_struct *task) | ||
| 91 | { | 90 | { |
| 92 | task->thread.per_info.single_step = 1; | 91 | task->thread.per_info.single_step = 1; |
| 93 | FixPerRegisters(task); | 92 | FixPerRegisters(task); |
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | void | 95 | static void clear_single_step(struct task_struct *task) |
| 97 | clear_single_step(struct task_struct *task) | ||
| 98 | { | 96 | { |
| 99 | task->thread.per_info.single_step = 0; | 97 | task->thread.per_info.single_step = 0; |
| 100 | FixPerRegisters(task); | 98 | FixPerRegisters(task); |
| @@ -309,7 +307,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data) | |||
| 309 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 307 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); |
| 310 | if (copied != sizeof(tmp)) | 308 | if (copied != sizeof(tmp)) |
| 311 | return -EIO; | 309 | return -EIO; |
| 312 | return put_user(tmp, (unsigned long __user *) data); | 310 | return put_user(tmp, (unsigned long __force __user *) data); |
| 313 | 311 | ||
| 314 | case PTRACE_PEEKUSR: | 312 | case PTRACE_PEEKUSR: |
| 315 | /* read the word at location addr in the USER area. */ | 313 | /* read the word at location addr in the USER area. */ |
| @@ -331,7 +329,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data) | |||
| 331 | 329 | ||
| 332 | case PTRACE_PEEKUSR_AREA: | 330 | case PTRACE_PEEKUSR_AREA: |
| 333 | case PTRACE_POKEUSR_AREA: | 331 | case PTRACE_POKEUSR_AREA: |
| 334 | if (copy_from_user(&parea, (void __user *) addr, | 332 | if (copy_from_user(&parea, (void __force __user *) addr, |
| 335 | sizeof(parea))) | 333 | sizeof(parea))) |
| 336 | return -EFAULT; | 334 | return -EFAULT; |
| 337 | addr = parea.kernel_addr; | 335 | addr = parea.kernel_addr; |
| @@ -341,10 +339,11 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data) | |||
| 341 | if (request == PTRACE_PEEKUSR_AREA) | 339 | if (request == PTRACE_PEEKUSR_AREA) |
| 342 | ret = peek_user(child, addr, data); | 340 | ret = peek_user(child, addr, data); |
| 343 | else { | 341 | else { |
| 344 | addr_t tmp; | 342 | addr_t utmp; |
| 345 | if (get_user (tmp, (addr_t __user *) data)) | 343 | if (get_user(utmp, |
| 344 | (addr_t __force __user *) data)) | ||
| 346 | return -EFAULT; | 345 | return -EFAULT; |
| 347 | ret = poke_user(child, addr, tmp); | 346 | ret = poke_user(child, addr, utmp); |
| 348 | } | 347 | } |
| 349 | if (ret) | 348 | if (ret) |
| 350 | return ret; | 349 | return ret; |
| @@ -550,7 +549,7 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data) | |||
| 550 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 549 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); |
| 551 | if (copied != sizeof(tmp)) | 550 | if (copied != sizeof(tmp)) |
| 552 | return -EIO; | 551 | return -EIO; |
| 553 | return put_user(tmp, (unsigned int __user *) data); | 552 | return put_user(tmp, (unsigned int __force __user *) data); |
| 554 | 553 | ||
| 555 | case PTRACE_PEEKUSR: | 554 | case PTRACE_PEEKUSR: |
| 556 | /* read the word at location addr in the USER area. */ | 555 | /* read the word at location addr in the USER area. */ |
| @@ -571,7 +570,7 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data) | |||
| 571 | 570 | ||
| 572 | case PTRACE_PEEKUSR_AREA: | 571 | case PTRACE_PEEKUSR_AREA: |
| 573 | case PTRACE_POKEUSR_AREA: | 572 | case PTRACE_POKEUSR_AREA: |
| 574 | if (copy_from_user(&parea, (void __user *) addr, | 573 | if (copy_from_user(&parea, (void __force __user *) addr, |
| 575 | sizeof(parea))) | 574 | sizeof(parea))) |
| 576 | return -EFAULT; | 575 | return -EFAULT; |
| 577 | addr = parea.kernel_addr; | 576 | addr = parea.kernel_addr; |
| @@ -581,10 +580,11 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data) | |||
| 581 | if (request == PTRACE_PEEKUSR_AREA) | 580 | if (request == PTRACE_PEEKUSR_AREA) |
| 582 | ret = peek_user_emu31(child, addr, data); | 581 | ret = peek_user_emu31(child, addr, data); |
| 583 | else { | 582 | else { |
| 584 | __u32 tmp; | 583 | __u32 utmp; |
| 585 | if (get_user (tmp, (__u32 __user *) data)) | 584 | if (get_user(utmp, |
| 585 | (__u32 __force __user *) data)) | ||
| 586 | return -EFAULT; | 586 | return -EFAULT; |
| 587 | ret = poke_user_emu31(child, addr, tmp); | 587 | ret = poke_user_emu31(child, addr, utmp); |
| 588 | } | 588 | } |
| 589 | if (ret) | 589 | if (ret) |
| 590 | return ret; | 590 | return ret; |
| @@ -595,17 +595,19 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data) | |||
| 595 | return 0; | 595 | return 0; |
| 596 | case PTRACE_GETEVENTMSG: | 596 | case PTRACE_GETEVENTMSG: |
| 597 | return put_user((__u32) child->ptrace_message, | 597 | return put_user((__u32) child->ptrace_message, |
| 598 | (unsigned int __user *) data); | 598 | (unsigned int __force __user *) data); |
| 599 | case PTRACE_GETSIGINFO: | 599 | case PTRACE_GETSIGINFO: |
| 600 | if (child->last_siginfo == NULL) | 600 | if (child->last_siginfo == NULL) |
| 601 | return -EINVAL; | 601 | return -EINVAL; |
| 602 | return copy_siginfo_to_user32((compat_siginfo_t __user *) data, | 602 | return copy_siginfo_to_user32((compat_siginfo_t |
| 603 | __force __user *) data, | ||
| 603 | child->last_siginfo); | 604 | child->last_siginfo); |
| 604 | case PTRACE_SETSIGINFO: | 605 | case PTRACE_SETSIGINFO: |
| 605 | if (child->last_siginfo == NULL) | 606 | if (child->last_siginfo == NULL) |
| 606 | return -EINVAL; | 607 | return -EINVAL; |
| 607 | return copy_siginfo_from_user32(child->last_siginfo, | 608 | return copy_siginfo_from_user32(child->last_siginfo, |
| 608 | (compat_siginfo_t __user *) data); | 609 | (compat_siginfo_t |
| 610 | __force __user *) data); | ||
| 609 | } | 611 | } |
| 610 | return ptrace_request(child, request, addr, data); | 612 | return ptrace_request(child, request, addr, data); |
| 611 | } | 613 | } |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 5d8ee3baac14..1cbf956cb6b3 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/device.h> | 38 | #include <linux/device.h> |
| 39 | #include <linux/notifier.h> | 39 | #include <linux/notifier.h> |
| 40 | #include <linux/pfn.h> | 40 | #include <linux/pfn.h> |
| 41 | #include <linux/reboot.h> | ||
| 41 | 42 | ||
| 42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
| 43 | #include <asm/system.h> | 44 | #include <asm/system.h> |
| @@ -117,7 +118,7 @@ void __devinit cpu_init (void) | |||
| 117 | */ | 118 | */ |
| 118 | char vmhalt_cmd[128] = ""; | 119 | char vmhalt_cmd[128] = ""; |
| 119 | char vmpoff_cmd[128] = ""; | 120 | char vmpoff_cmd[128] = ""; |
| 120 | char vmpanic_cmd[128] = ""; | 121 | static char vmpanic_cmd[128] = ""; |
| 121 | 122 | ||
| 122 | static inline void strncpy_skip_quote(char *dst, char *src, int n) | 123 | static inline void strncpy_skip_quote(char *dst, char *src, int n) |
| 123 | { | 124 | { |
| @@ -275,10 +276,6 @@ static void __init conmode_default(void) | |||
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | #ifdef CONFIG_SMP | 278 | #ifdef CONFIG_SMP |
| 278 | extern void machine_restart_smp(char *); | ||
| 279 | extern void machine_halt_smp(void); | ||
| 280 | extern void machine_power_off_smp(void); | ||
| 281 | |||
| 282 | void (*_machine_restart)(char *command) = machine_restart_smp; | 279 | void (*_machine_restart)(char *command) = machine_restart_smp; |
| 283 | void (*_machine_halt)(void) = machine_halt_smp; | 280 | void (*_machine_halt)(void) = machine_halt_smp; |
| 284 | void (*_machine_power_off)(void) = machine_power_off_smp; | 281 | void (*_machine_power_off)(void) = machine_power_off_smp; |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index c0cd255fddbd..3cb7e1032072 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
| @@ -22,23 +22,23 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
| 24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
| 25 | |||
| 26 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
| 27 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
| 28 | #include <linux/kernel_stat.h> | 27 | #include <linux/kernel_stat.h> |
| 29 | #include <linux/smp_lock.h> | 28 | #include <linux/smp_lock.h> |
| 30 | |||
| 31 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
| 32 | #include <linux/cache.h> | 30 | #include <linux/cache.h> |
| 33 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
| 34 | #include <linux/cpu.h> | 32 | #include <linux/cpu.h> |
| 35 | 33 | #include <linux/timex.h> | |
| 34 | #include <asm/setup.h> | ||
| 36 | #include <asm/sigp.h> | 35 | #include <asm/sigp.h> |
| 37 | #include <asm/pgalloc.h> | 36 | #include <asm/pgalloc.h> |
| 38 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
| 39 | #include <asm/s390_ext.h> | 38 | #include <asm/s390_ext.h> |
| 40 | #include <asm/cpcmd.h> | 39 | #include <asm/cpcmd.h> |
| 41 | #include <asm/tlbflush.h> | 40 | #include <asm/tlbflush.h> |
| 41 | #include <asm/timer.h> | ||
| 42 | 42 | ||
| 43 | extern volatile int __cpu_logical_map[]; | 43 | extern volatile int __cpu_logical_map[]; |
| 44 | 44 | ||
| @@ -53,12 +53,6 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE; | |||
| 53 | 53 | ||
| 54 | static struct task_struct *current_set[NR_CPUS]; | 54 | static struct task_struct *current_set[NR_CPUS]; |
| 55 | 55 | ||
| 56 | /* | ||
| 57 | * Reboot, halt and power_off routines for SMP. | ||
| 58 | */ | ||
| 59 | extern char vmhalt_cmd[]; | ||
| 60 | extern char vmpoff_cmd[]; | ||
| 61 | |||
| 62 | static void smp_ext_bitcall(int, ec_bit_sig); | 56 | static void smp_ext_bitcall(int, ec_bit_sig); |
| 63 | static void smp_ext_bitcall_others(ec_bit_sig); | 57 | static void smp_ext_bitcall_others(ec_bit_sig); |
| 64 | 58 | ||
| @@ -298,7 +292,7 @@ void machine_power_off_smp(void) | |||
| 298 | * cpus are handled. | 292 | * cpus are handled. |
| 299 | */ | 293 | */ |
| 300 | 294 | ||
| 301 | void do_ext_call_interrupt(__u16 code) | 295 | static void do_ext_call_interrupt(__u16 code) |
| 302 | { | 296 | { |
| 303 | unsigned long bits; | 297 | unsigned long bits; |
| 304 | 298 | ||
| @@ -385,7 +379,7 @@ struct ec_creg_mask_parms { | |||
| 385 | /* | 379 | /* |
| 386 | * callback for setting/clearing control bits | 380 | * callback for setting/clearing control bits |
| 387 | */ | 381 | */ |
| 388 | void smp_ctl_bit_callback(void *info) { | 382 | static void smp_ctl_bit_callback(void *info) { |
| 389 | struct ec_creg_mask_parms *pp = info; | 383 | struct ec_creg_mask_parms *pp = info; |
| 390 | unsigned long cregs[16]; | 384 | unsigned long cregs[16]; |
| 391 | int i; | 385 | int i; |
| @@ -458,9 +452,6 @@ __init smp_count_cpus(void) | |||
| 458 | /* | 452 | /* |
| 459 | * Activate a secondary processor. | 453 | * Activate a secondary processor. |
| 460 | */ | 454 | */ |
| 461 | extern void init_cpu_timer(void); | ||
| 462 | extern void init_cpu_vtimer(void); | ||
| 463 | |||
| 464 | int __devinit start_secondary(void *cpuvoid) | 455 | int __devinit start_secondary(void *cpuvoid) |
| 465 | { | 456 | { |
| 466 | /* Setup the cpu */ | 457 | /* Setup the cpu */ |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 6cceed4df73e..5d4a190fa307 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
| @@ -245,7 +245,7 @@ static struct notifier_block nohz_idle_nb = { | |||
| 245 | .notifier_call = nohz_idle_notify, | 245 | .notifier_call = nohz_idle_notify, |
| 246 | }; | 246 | }; |
| 247 | 247 | ||
| 248 | void __init nohz_init(void) | 248 | static void __init nohz_init(void) |
| 249 | { | 249 | { |
| 250 | if (register_idle_notifier(&nohz_idle_nb)) | 250 | if (register_idle_notifier(&nohz_idle_nb)) |
| 251 | panic("Couldn't register idle notifier"); | 251 | panic("Couldn't register idle notifier"); |
| @@ -271,8 +271,6 @@ void init_cpu_timer(void) | |||
| 271 | __ctl_load(cr0, 0, 0); | 271 | __ctl_load(cr0, 0, 0); |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | extern void vtime_init(void); | ||
| 275 | |||
| 276 | static cycle_t read_tod_clock(void) | 274 | static cycle_t read_tod_clock(void) |
| 277 | { | 275 | { |
| 278 | return get_clock(); | 276 | return get_clock(); |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 3cbb0dcf1f1d..aa0d7ee71c78 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
| @@ -283,7 +283,7 @@ char *task_show_regs(struct task_struct *task, char *buffer) | |||
| 283 | return buffer; | 283 | return buffer; |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | DEFINE_SPINLOCK(die_lock); | 286 | static DEFINE_SPINLOCK(die_lock); |
| 287 | 287 | ||
| 288 | void die(const char * str, struct pt_regs * regs, long err) | 288 | void die(const char * str, struct pt_regs * regs, long err) |
| 289 | { | 289 | { |
| @@ -364,8 +364,7 @@ void __kprobes do_single_step(struct pt_regs *regs) | |||
| 364 | force_sig(SIGTRAP, current); | 364 | force_sig(SIGTRAP, current); |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | asmlinkage void | 367 | static void default_trap_handler(struct pt_regs * regs, long interruption_code) |
| 368 | default_trap_handler(struct pt_regs * regs, long interruption_code) | ||
| 369 | { | 368 | { |
| 370 | if (regs->psw.mask & PSW_MASK_PSTATE) { | 369 | if (regs->psw.mask & PSW_MASK_PSTATE) { |
| 371 | local_irq_enable(); | 370 | local_irq_enable(); |
| @@ -376,7 +375,7 @@ default_trap_handler(struct pt_regs * regs, long interruption_code) | |||
| 376 | } | 375 | } |
| 377 | 376 | ||
| 378 | #define DO_ERROR_INFO(signr, str, name, sicode, siaddr) \ | 377 | #define DO_ERROR_INFO(signr, str, name, sicode, siaddr) \ |
| 379 | asmlinkage void name(struct pt_regs * regs, long interruption_code) \ | 378 | static void name(struct pt_regs * regs, long interruption_code) \ |
| 380 | { \ | 379 | { \ |
| 381 | siginfo_t info; \ | 380 | siginfo_t info; \ |
| 382 | info.si_signo = signr; \ | 381 | info.si_signo = signr; \ |
| @@ -442,7 +441,7 @@ do_fp_trap(struct pt_regs *regs, void __user *location, | |||
| 442 | "floating point exception", regs, &si); | 441 | "floating point exception", regs, &si); |
| 443 | } | 442 | } |
| 444 | 443 | ||
| 445 | asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | 444 | static void illegal_op(struct pt_regs * regs, long interruption_code) |
| 446 | { | 445 | { |
| 447 | siginfo_t info; | 446 | siginfo_t info; |
| 448 | __u8 opcode[6]; | 447 | __u8 opcode[6]; |
| @@ -585,7 +584,7 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception, | |||
| 585 | ILL_ILLOPN, get_check_address(regs)); | 584 | ILL_ILLOPN, get_check_address(regs)); |
| 586 | #endif | 585 | #endif |
| 587 | 586 | ||
| 588 | asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) | 587 | static void data_exception(struct pt_regs * regs, long interruption_code) |
| 589 | { | 588 | { |
| 590 | __u16 __user *location; | 589 | __u16 __user *location; |
| 591 | int signal = 0; | 590 | int signal = 0; |
| @@ -675,7 +674,7 @@ asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) | |||
| 675 | } | 674 | } |
| 676 | } | 675 | } |
| 677 | 676 | ||
| 678 | asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code) | 677 | static void space_switch_exception(struct pt_regs * regs, long int_code) |
| 679 | { | 678 | { |
| 680 | siginfo_t info; | 679 | siginfo_t info; |
| 681 | 680 | ||
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 21baaf5496d6..01f3d29bdb06 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <asm/irq_regs.h> | 25 | #include <asm/irq_regs.h> |
| 26 | 26 | ||
| 27 | static ext_int_info_t ext_int_info_timer; | 27 | static ext_int_info_t ext_int_info_timer; |
| 28 | DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); | 28 | static DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); |
| 29 | 29 | ||
| 30 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 30 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
| 31 | /* | 31 | /* |
