Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
2b67fc46 55dff522

+210 -189
+1 -1
arch/s390/appldata/appldata_base.c
··· 81 81 /* 82 82 * Timer 83 83 */ 84 - DEFINE_PER_CPU(struct vtimer_list, appldata_timer); 84 + static DEFINE_PER_CPU(struct vtimer_list, appldata_timer); 85 85 static atomic_t appldata_expire_count = ATOMIC_INIT(0); 86 86 87 87 static DEFINE_SPINLOCK(appldata_timer_lock);
+1 -1
arch/s390/appldata/appldata_mem.c
··· 36 36 * book: 37 37 * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml 38 38 */ 39 - struct appldata_mem_data { 39 + static struct appldata_mem_data { 40 40 u64 timestamp; 41 41 u32 sync_count_1; /* after VM collected the record data, */ 42 42 u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
+1 -1
arch/s390/appldata/appldata_net_sum.c
··· 34 34 * book: 35 35 * http://oss.software.ibm.com/developerworks/opensource/linux390/index.shtml 36 36 */ 37 - struct appldata_net_sum_data { 37 + static struct appldata_net_sum_data { 38 38 u64 timestamp; 39 39 u32 sync_count_1; /* after VM collected the record data, */ 40 40 u32 sync_count_2; /* sync_count_1 and sync_count_2 should be the
+3 -3
arch/s390/crypto/aes_s390.c
··· 27 27 /* data block size for all key lengths */ 28 28 #define AES_BLOCK_SIZE 16 29 29 30 - int has_aes_128 = 0; 31 - int has_aes_192 = 0; 32 - int has_aes_256 = 0; 30 + static int has_aes_128 = 0; 31 + static int has_aes_192 = 0; 32 + static int has_aes_256 = 0; 33 33 34 34 struct s390_aes_ctx { 35 35 u8 iv[AES_BLOCK_SIZE];
+1
arch/s390/crypto/des_check_key.c
··· 30 30 #include <linux/module.h> 31 31 #include <linux/errno.h> 32 32 #include <linux/crypto.h> 33 + #include "crypto_des.h" 33 34 34 35 #define ROR(d,c,o) ((d) = (d) >> (c) | (d) << (o)) 35 36
+2 -3
arch/s390/kernel/compat_exec_domain.c
··· 12 12 #include <linux/personality.h> 13 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 18 - s390_init (void) 17 + static int __init s390_init (void) 19 18 { 20 19 s390_exec_domain.name = "Linux/s390"; 21 20 s390_exec_domain.handler = NULL;
+10 -8
arch/s390/kernel/compat_linux.c
··· 416 416 mm_segment_t old_fs = get_fs (); 417 417 418 418 set_fs (KERNEL_DS); 419 - ret = sys_sysinfo((struct sysinfo __user *) &s); 419 + ret = sys_sysinfo((struct sysinfo __force __user *) &s); 420 420 set_fs (old_fs); 421 421 err = put_user (s.uptime, &info->uptime); 422 422 err |= __put_user (s.loads[0], &info->loads[0]); ··· 445 445 mm_segment_t old_fs = get_fs (); 446 446 447 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 450 set_fs (old_fs); 450 451 if (put_compat_timespec(&t, interval)) 451 452 return -EFAULT; ··· 473 472 } 474 473 set_fs (KERNEL_DS); 475 474 ret = sys_rt_sigprocmask(how, 476 - set ? (sigset_t __user *) &s : NULL, 477 - oset ? (sigset_t __user *) &s : NULL, 475 + set ? (sigset_t __force __user *) &s : NULL, 476 + oset ? (sigset_t __force __user *) &s : NULL, 478 477 sigsetsize); 479 478 set_fs (old_fs); 480 479 if (ret) return ret; ··· 500 499 mm_segment_t old_fs = get_fs(); 501 500 502 501 set_fs (KERNEL_DS); 503 - ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize); 502 + ret = sys_rt_sigpending((sigset_t __force __user *) &s, sigsetsize); 504 503 set_fs (old_fs); 505 504 if (!ret) { 506 505 switch (_NSIG_WORDS) { ··· 525 524 if (copy_siginfo_from_user32(&info, uinfo)) 526 525 return -EFAULT; 527 526 set_fs (KERNEL_DS); 528 - ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); 527 + ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *) &info); 529 528 set_fs (old_fs); 530 529 return ret; 531 530 } ··· 683 682 684 683 set_fs(KERNEL_DS); 685 684 ret = sys_sendfile(out_fd, in_fd, 686 - offset ? (off_t __user *) &of : NULL, count); 685 + offset ? (off_t __force __user *) &of : NULL, count); 687 686 set_fs(old_fs); 688 687 689 688 if (offset && put_user(of, offset)) ··· 704 703 705 704 set_fs(KERNEL_DS); 706 705 ret = sys_sendfile64(out_fd, in_fd, 707 - offset ? (loff_t __user *) &lof : NULL, count); 706 + offset ? (loff_t __force __user *) &lof : NULL, 707 + count); 708 708 set_fs(old_fs); 709 709 710 710 if (offset && put_user(lof, offset))
+3 -3
arch/s390/kernel/compat_signal.c
··· 275 275 } 276 276 277 277 set_fs (KERNEL_DS); 278 - ret = do_sigaltstack((stack_t __user *) (uss ? &kss : NULL), 279 - (stack_t __user *) (uoss ? &koss : NULL), 278 + ret = do_sigaltstack((stack_t __force __user *) (uss ? &kss : NULL), 279 + (stack_t __force __user *) (uoss ? &koss : NULL), 280 280 regs->gprs[15]); 281 281 set_fs (old_fs); 282 282 ··· 401 401 goto badframe; 402 402 403 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 405 set_fs (old_fs); 406 406 407 407 return regs->gprs[2];
+1
arch/s390/kernel/crash.c
··· 9 9 10 10 #include <linux/threads.h> 11 11 #include <linux/kexec.h> 12 + #include <linux/reboot.h> 12 13 13 14 void machine_crash_shutdown(struct pt_regs *regs) 14 15 {
+8 -10
arch/s390/kernel/debug.c
··· 120 120 NULL 121 121 }; 122 122 123 - struct debug_view debug_level_view = { 123 + static struct debug_view debug_level_view = { 124 124 "level", 125 125 &debug_prolog_level_fn, 126 126 NULL, ··· 129 129 NULL 130 130 }; 131 131 132 - struct debug_view debug_pages_view = { 132 + static struct debug_view debug_pages_view = { 133 133 "pages", 134 134 &debug_prolog_pages_fn, 135 135 NULL, ··· 138 138 NULL 139 139 }; 140 140 141 - struct debug_view debug_flush_view = { 141 + static struct debug_view debug_flush_view = { 142 142 "flush", 143 143 NULL, 144 144 NULL, ··· 156 156 NULL 157 157 }; 158 158 159 - 159 + /* used by dump analysis tools to determine version of debug feature */ 160 160 unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION; 161 161 162 162 /* static globals */ 163 163 164 164 static debug_info_t *debug_area_first = NULL; 165 165 static debug_info_t *debug_area_last = NULL; 166 - DECLARE_MUTEX(debug_lock); 166 + static DECLARE_MUTEX(debug_lock); 167 167 168 168 static int initialized; 169 169 ··· 905 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 910 void 911 911 debug_stop_all(void) ··· 1300 1300 * flushes debug areas 1301 1301 */ 1302 1302 1303 - void 1304 - debug_flush(debug_info_t* id, int area) 1303 + static void debug_flush(debug_info_t* id, int area) 1305 1304 { 1306 1305 unsigned long flags; 1307 1306 int i,j; ··· 1510 1511 /* 1511 1512 * clean up module 1512 1513 */ 1513 - void 1514 - __exit debug_exit(void) 1514 + static void __exit debug_exit(void) 1515 1515 { 1516 1516 debugfs_remove(debug_debugfs_root_entry); 1517 1517 unregister_sysctl_table(s390dbf_sysctl_header);
+1
arch/s390/kernel/ebcdic.c
··· 11 11 12 12 #include <linux/module.h> 13 13 #include <asm/types.h> 14 + #include <asm/ebcdic.h> 14 15 15 16 /* 16 17 * ASCII (IBM PC 437) -> EBCDIC 037
+2 -1
arch/s390/kernel/kprobes.c
··· 365 365 /* 366 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 371 struct kretprobe_instance *ri = NULL; 371 372 struct hlist_head *head, empty_rp;
+1
arch/s390/kernel/machine_kexec.c
··· 11 11 #include <linux/mm.h> 12 12 #include <linux/kexec.h> 13 13 #include <linux/delay.h> 14 + #include <linux/reboot.h> 14 15 #include <asm/cio.h> 15 16 #include <asm/setup.h> 16 17 #include <asm/pgtable.h>
+1
arch/s390/kernel/module.c
··· 30 30 #include <linux/fs.h> 31 31 #include <linux/string.h> 32 32 #include <linux/kernel.h> 33 + #include <linux/moduleloader.h> 33 34 34 35 #if 0 35 36 #define DEBUGP printk
+19 -17
arch/s390/kernel/ptrace.c
··· 86 86 per_info->control_regs.bits.storage_alt_space_ctl = 0; 87 87 } 88 88 89 - void 90 - set_single_step(struct task_struct *task) 89 + static void set_single_step(struct task_struct *task) 91 90 { 92 91 task->thread.per_info.single_step = 1; 93 92 FixPerRegisters(task); 94 93 } 95 94 96 - void 97 - clear_single_step(struct task_struct *task) 95 + static void clear_single_step(struct task_struct *task) 98 96 { 99 97 task->thread.per_info.single_step = 0; 100 98 FixPerRegisters(task); ··· 307 309 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 308 310 if (copied != sizeof(tmp)) 309 311 return -EIO; 310 - return put_user(tmp, (unsigned long __user *) data); 312 + return put_user(tmp, (unsigned long __force __user *) data); 311 313 312 314 case PTRACE_PEEKUSR: 313 315 /* read the word at location addr in the USER area. */ ··· 329 331 330 332 case PTRACE_PEEKUSR_AREA: 331 333 case PTRACE_POKEUSR_AREA: 332 - if (copy_from_user(&parea, (void __user *) addr, 334 + if (copy_from_user(&parea, (void __force __user *) addr, 333 335 sizeof(parea))) 334 336 return -EFAULT; 335 337 addr = parea.kernel_addr; ··· 339 341 if (request == PTRACE_PEEKUSR_AREA) 340 342 ret = peek_user(child, addr, data); 341 343 else { 342 - addr_t tmp; 343 - if (get_user (tmp, (addr_t __user *) data)) 344 + addr_t utmp; 345 + if (get_user(utmp, 346 + (addr_t __force __user *) data)) 344 347 return -EFAULT; 345 - ret = poke_user(child, addr, tmp); 348 + ret = poke_user(child, addr, utmp); 346 349 } 347 350 if (ret) 348 351 return ret; ··· 549 550 copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); 550 551 if (copied != sizeof(tmp)) 551 552 return -EIO; 552 - return put_user(tmp, (unsigned int __user *) data); 553 + return put_user(tmp, (unsigned int __force __user *) data); 553 554 554 555 case PTRACE_PEEKUSR: 555 556 /* read the word at location addr in the USER area. */ ··· 570 571 571 572 case PTRACE_PEEKUSR_AREA: 572 573 case PTRACE_POKEUSR_AREA: 573 - if (copy_from_user(&parea, (void __user *) addr, 574 + if (copy_from_user(&parea, (void __force __user *) addr, 574 575 sizeof(parea))) 575 576 return -EFAULT; 576 577 addr = parea.kernel_addr; ··· 580 581 if (request == PTRACE_PEEKUSR_AREA) 581 582 ret = peek_user_emu31(child, addr, data); 582 583 else { 583 - __u32 tmp; 584 - if (get_user (tmp, (__u32 __user *) data)) 584 + __u32 utmp; 585 + if (get_user(utmp, 586 + (__u32 __force __user *) data)) 585 587 return -EFAULT; 586 - ret = poke_user_emu31(child, addr, tmp); 588 + ret = poke_user_emu31(child, addr, utmp); 587 589 } 588 590 if (ret) 589 591 return ret; ··· 595 595 return 0; 596 596 case PTRACE_GETEVENTMSG: 597 597 return put_user((__u32) child->ptrace_message, 598 - (unsigned int __user *) data); 598 + (unsigned int __force __user *) data); 599 599 case PTRACE_GETSIGINFO: 600 600 if (child->last_siginfo == NULL) 601 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 604 child->last_siginfo); 604 605 case PTRACE_SETSIGINFO: 605 606 if (child->last_siginfo == NULL) 606 607 return -EINVAL; 607 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 612 return ptrace_request(child, request, addr, data); 611 613 }
+2 -5
arch/s390/kernel/setup.c
··· 38 38 #include <linux/device.h> 39 39 #include <linux/notifier.h> 40 40 #include <linux/pfn.h> 41 + #include <linux/reboot.h> 41 42 42 43 #include <asm/uaccess.h> 43 44 #include <asm/system.h> ··· 118 117 */ 119 118 char vmhalt_cmd[128] = ""; 120 119 char vmpoff_cmd[128] = ""; 121 - char vmpanic_cmd[128] = ""; 120 + static char vmpanic_cmd[128] = ""; 122 121 123 122 static inline void strncpy_skip_quote(char *dst, char *src, int n) 124 123 { ··· 276 275 } 277 276 278 277 #ifdef CONFIG_SMP 279 - extern void machine_restart_smp(char *); 280 - extern void machine_halt_smp(void); 281 - extern void machine_power_off_smp(void); 282 - 283 278 void (*_machine_restart)(char *command) = machine_restart_smp; 284 279 void (*_machine_halt)(void) = machine_halt_smp; 285 280 void (*_machine_power_off)(void) = machine_power_off_smp;
+5 -14
arch/s390/kernel/smp.c
··· 22 22 23 23 #include <linux/module.h> 24 24 #include <linux/init.h> 25 - 26 25 #include <linux/mm.h> 27 26 #include <linux/spinlock.h> 28 27 #include <linux/kernel_stat.h> 29 28 #include <linux/smp_lock.h> 30 - 31 29 #include <linux/delay.h> 32 30 #include <linux/cache.h> 33 31 #include <linux/interrupt.h> 34 32 #include <linux/cpu.h> 35 - 33 + #include <linux/timex.h> 34 + #include <asm/setup.h> 36 35 #include <asm/sigp.h> 37 36 #include <asm/pgalloc.h> 38 37 #include <asm/irq.h> 39 38 #include <asm/s390_ext.h> 40 39 #include <asm/cpcmd.h> 41 40 #include <asm/tlbflush.h> 41 + #include <asm/timer.h> 42 42 43 43 extern volatile int __cpu_logical_map[]; 44 44 ··· 52 52 cpumask_t cpu_possible_map = CPU_MASK_NONE; 53 53 54 54 static struct task_struct *current_set[NR_CPUS]; 55 - 56 - /* 57 - * Reboot, halt and power_off routines for SMP. 58 - */ 59 - extern char vmhalt_cmd[]; 60 - extern char vmpoff_cmd[]; 61 55 62 56 static void smp_ext_bitcall(int, ec_bit_sig); 63 57 static void smp_ext_bitcall_others(ec_bit_sig); ··· 292 298 * cpus are handled. 293 299 */ 294 300 295 - void do_ext_call_interrupt(__u16 code) 301 + static void do_ext_call_interrupt(__u16 code) 296 302 { 297 303 unsigned long bits; 298 304 ··· 379 385 /* 380 386 * callback for setting/clearing control bits 381 387 */ 382 - void smp_ctl_bit_callback(void *info) { 388 + static void smp_ctl_bit_callback(void *info) { 383 389 struct ec_creg_mask_parms *pp = info; 384 390 unsigned long cregs[16]; 385 391 int i; ··· 452 458 /* 453 459 * Activate a secondary processor. 454 460 */ 455 - extern void init_cpu_timer(void); 456 - extern void init_cpu_vtimer(void); 457 - 458 461 int __devinit start_secondary(void *cpuvoid) 459 462 { 460 463 /* Setup the cpu */
+1 -3
arch/s390/kernel/time.c
··· 245 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 250 if (register_idle_notifier(&nohz_idle_nb)) 251 251 panic("Couldn't register idle notifier"); ··· 270 270 cr0 |= 0x800; 271 271 __ctl_load(cr0, 0, 0); 272 272 } 273 - 274 - extern void vtime_init(void); 275 273 276 274 static cycle_t read_tod_clock(void) 277 275 {
+6 -7
arch/s390/kernel/traps.c
··· 283 283 return buffer; 284 284 } 285 285 286 - DEFINE_SPINLOCK(die_lock); 286 + static DEFINE_SPINLOCK(die_lock); 287 287 288 288 void die(const char * str, struct pt_regs * regs, long err) 289 289 { ··· 364 364 force_sig(SIGTRAP, current); 365 365 } 366 366 367 - asmlinkage void 368 - default_trap_handler(struct pt_regs * regs, long interruption_code) 367 + static void default_trap_handler(struct pt_regs * regs, long interruption_code) 369 368 { 370 369 if (regs->psw.mask & PSW_MASK_PSTATE) { 371 370 local_irq_enable(); ··· 375 376 } 376 377 377 378 #define DO_ERROR_INFO(signr, str, name, sicode, siaddr) \ 378 - asmlinkage void name(struct pt_regs * regs, long interruption_code) \ 379 + static void name(struct pt_regs * regs, long interruption_code) \ 379 380 { \ 380 381 siginfo_t info; \ 381 382 info.si_signo = signr; \ ··· 441 442 "floating point exception", regs, &si); 442 443 } 443 444 444 - asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) 445 + static void illegal_op(struct pt_regs * regs, long interruption_code) 445 446 { 446 447 siginfo_t info; 447 448 __u8 opcode[6]; ··· 584 585 ILL_ILLOPN, get_check_address(regs)); 585 586 #endif 586 587 587 - asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) 588 + static void data_exception(struct pt_regs * regs, long interruption_code) 588 589 { 589 590 __u16 __user *location; 590 591 int signal = 0; ··· 674 675 } 675 676 } 676 677 677 - asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code) 678 + static void space_switch_exception(struct pt_regs * regs, long int_code) 678 679 { 679 680 siginfo_t info; 680 681
+1 -1
arch/s390/kernel/vtime.c
··· 25 25 #include <asm/irq_regs.h> 26 26 27 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 30 #ifdef CONFIG_VIRT_CPU_ACCOUNTING 31 31 /*
+23
arch/s390/lib/uaccess.h
··· 1 + /* 2 + * arch/s390/uaccess.h 3 + * 4 + * Copyright IBM Corp. 2007 5 + * 6 + */ 7 + 8 + #ifndef __ARCH_S390_LIB_UACCESS_H 9 + #define __ARCH_S390_LIB_UACCESS_H 10 + 11 + extern size_t copy_from_user_std(size_t, const void __user *, void *); 12 + extern size_t copy_to_user_std(size_t, void __user *, const void *); 13 + extern size_t strnlen_user_std(size_t, const char __user *); 14 + extern size_t strncpy_from_user_std(size_t, const char __user *, char *); 15 + extern int futex_atomic_cmpxchg_std(int __user *, int, int); 16 + extern int futex_atomic_op_std(int, int __user *, int, int *); 17 + 18 + extern size_t copy_from_user_pt(size_t, const void __user *, void *); 19 + extern size_t copy_to_user_pt(size_t, void __user *, const void *); 20 + extern int futex_atomic_op_pt(int, int __user *, int, int *); 21 + extern int futex_atomic_cmpxchg_pt(int __user *, int, int); 22 + 23 + #endif /* __ARCH_S390_LIB_UACCESS_H */
+11 -16
arch/s390/lib/uaccess_mvcos.c
··· 12 12 #include <linux/mm.h> 13 13 #include <asm/uaccess.h> 14 14 #include <asm/futex.h> 15 + #include "uaccess.h" 15 16 16 17 #ifndef __s390x__ 17 18 #define AHI "ahi" ··· 28 27 #define SLR "slgr" 29 28 #endif 30 29 31 - extern size_t copy_from_user_std(size_t, const void __user *, void *); 32 - extern size_t copy_to_user_std(size_t, void __user *, const void *); 33 - 34 - size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x) 30 + static size_t copy_from_user_mvcos(size_t size, const void __user *ptr, void *x) 35 31 { 36 32 register unsigned long reg0 asm("0") = 0x81UL; 37 33 unsigned long tmp1, tmp2; ··· 67 69 return size; 68 70 } 69 71 70 - size_t copy_from_user_mvcos_check(size_t size, const void __user *ptr, void *x) 72 + static size_t copy_from_user_mvcos_check(size_t size, const void __user *ptr, void *x) 71 73 { 72 74 if (size <= 256) 73 75 return copy_from_user_std(size, ptr, x); 74 76 return copy_from_user_mvcos(size, ptr, x); 75 77 } 76 78 77 - size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) 79 + static size_t copy_to_user_mvcos(size_t size, void __user *ptr, const void *x) 78 80 { 79 81 register unsigned long reg0 asm("0") = 0x810000UL; 80 82 unsigned long tmp1, tmp2; ··· 103 105 return size; 104 106 } 105 107 106 - size_t copy_to_user_mvcos_check(size_t size, void __user *ptr, const void *x) 108 + static size_t copy_to_user_mvcos_check(size_t size, void __user *ptr, 109 + const void *x) 107 110 { 108 111 if (size <= 256) 109 112 return copy_to_user_std(size, ptr, x); 110 113 return copy_to_user_mvcos(size, ptr, x); 111 114 } 112 115 113 - size_t copy_in_user_mvcos(size_t size, void __user *to, const void __user *from) 116 + static size_t copy_in_user_mvcos(size_t size, void __user *to, 117 + const void __user *from) 114 118 { 115 119 register unsigned long reg0 asm("0") = 0x810081UL; 116 120 unsigned long tmp1, tmp2; ··· 134 134 return size; 135 135 } 136 136 137 - size_t clear_user_mvcos(size_t size, void __user *to) 137 + static size_t clear_user_mvcos(size_t size, void __user *to) 138 138 { 139 139 register unsigned long reg0 asm("0") = 0x810000UL; 140 140 unsigned long tmp1, tmp2; ··· 162 162 return size; 163 163 } 164 164 165 - extern size_t strnlen_user_std(size_t, const char __user *); 166 - extern size_t strncpy_from_user_std(size_t, const char __user *, char *); 167 - extern int futex_atomic_op(int, int __user *, int, int *); 168 - extern int futex_atomic_cmpxchg(int __user *, int, int); 169 - 170 165 struct uaccess_ops uaccess_mvcos = { 171 166 .copy_from_user = copy_from_user_mvcos_check, 172 167 .copy_from_user_small = copy_from_user_std, ··· 171 176 .clear_user = clear_user_mvcos, 172 177 .strnlen_user = strnlen_user_std, 173 178 .strncpy_from_user = strncpy_from_user_std, 174 - .futex_atomic_op = futex_atomic_op, 175 - .futex_atomic_cmpxchg = futex_atomic_cmpxchg, 179 + .futex_atomic_op = futex_atomic_op_std, 180 + .futex_atomic_cmpxchg = futex_atomic_cmpxchg_std, 176 181 };
+1
arch/s390/lib/uaccess_pt.c
··· 12 12 #include <linux/mm.h> 13 13 #include <asm/uaccess.h> 14 14 #include <asm/futex.h> 15 + #include "uaccess.h" 15 16 16 17 static inline int __handle_fault(struct mm_struct *mm, unsigned long address, 17 18 int write_access)
+12 -11
arch/s390/lib/uaccess_std.c
··· 13 13 #include <linux/mm.h> 14 14 #include <linux/uaccess.h> 15 15 #include <asm/futex.h> 16 + #include "uaccess.h" 16 17 17 18 #ifndef __s390x__ 18 19 #define AHI "ahi" ··· 28 27 #define LHI "lghi" 29 28 #define SLR "slgr" 30 29 #endif 31 - 32 - extern size_t copy_from_user_pt(size_t n, const void __user *from, void *to); 33 - extern size_t copy_to_user_pt(size_t n, void __user *to, const void *from); 34 30 35 31 size_t copy_from_user_std(size_t size, const void __user *ptr, void *x) 36 32 { ··· 70 72 return size; 71 73 } 72 74 73 - size_t copy_from_user_std_check(size_t size, const void __user *ptr, void *x) 75 + static size_t copy_from_user_std_check(size_t size, const void __user *ptr, 76 + void *x) 74 77 { 75 78 if (size <= 1024) 76 79 return copy_from_user_std(size, ptr, x); ··· 109 110 return size; 110 111 } 111 112 112 - size_t copy_to_user_std_check(size_t size, void __user *ptr, const void *x) 113 + static size_t copy_to_user_std_check(size_t size, void __user *ptr, 114 + const void *x) 113 115 { 114 116 if (size <= 1024) 115 117 return copy_to_user_std(size, ptr, x); 116 118 return copy_to_user_pt(size, ptr, x); 117 119 } 118 120 119 - size_t copy_in_user_std(size_t size, void __user *to, const void __user *from) 121 + static size_t copy_in_user_std(size_t size, void __user *to, 122 + const void __user *from) 120 123 { 121 124 unsigned long tmp1; 122 125 ··· 149 148 return size; 150 149 } 151 150 152 - size_t clear_user_std(size_t size, void __user *to) 151 + static size_t clear_user_std(size_t size, void __user *to) 153 152 { 154 153 unsigned long tmp1, tmp2; 155 154 ··· 255 254 : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \ 256 255 "m" (*uaddr) : "cc"); 257 256 258 - int futex_atomic_op(int op, int __user *uaddr, int oparg, int *old) 257 + int futex_atomic_op_std(int op, int __user *uaddr, int oparg, int *old) 259 258 { 260 259 int oldval = 0, newval, ret; 261 260 ··· 287 286 return ret; 288 287 } 289 288 290 - int futex_atomic_cmpxchg(int __user *uaddr, int oldval, int newval) 289 + int futex_atomic_cmpxchg_std(int __user *uaddr, int oldval, int newval) 291 290 { 292 291 int ret; 293 292 ··· 312 311 .clear_user = clear_user_std, 313 312 .strnlen_user = strnlen_user_std, 314 313 .strncpy_from_user = strncpy_from_user_std, 315 - .futex_atomic_op = futex_atomic_op, 316 - .futex_atomic_cmpxchg = futex_atomic_cmpxchg, 314 + .futex_atomic_op = futex_atomic_op_std, 315 + .futex_atomic_cmpxchg = futex_atomic_cmpxchg_std, 317 316 };
+1 -1
arch/s390/mm/cmm.c
··· 414 414 } 415 415 #endif 416 416 417 - struct ctl_table_header *cmm_sysctl_header; 417 + static struct ctl_table_header *cmm_sysctl_header; 418 418 419 419 static int 420 420 cmm_init (void)
+2 -3
arch/s390/mm/fault.c
··· 52 52 extern void die(const char *,struct pt_regs *,long); 53 53 54 54 #ifdef CONFIG_KPROBES 55 - ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); 55 + static ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); 56 56 int register_page_fault_notifier(struct notifier_block *nb) 57 57 { 58 58 return atomic_notifier_chain_register(&notify_page_fault_chain, nb); ··· 452 452 : : "a" (&refbk), "m" (refbk) : "cc"); 453 453 } 454 454 455 - asmlinkage void 456 - pfault_interrupt(__u16 error_code) 455 + static void pfault_interrupt(__u16 error_code) 457 456 { 458 457 struct task_struct *tsk; 459 458 __u16 subcode;
+1 -2
arch/s390/mm/init.c
··· 25 25 #include <linux/bootmem.h> 26 26 #include <linux/pfn.h> 27 27 #include <linux/poison.h> 28 + #include <linux/initrd.h> 28 29 29 30 #include <asm/processor.h> 30 31 #include <asm/system.h> ··· 107 106 set_pte(pte, new_pte); 108 107 } 109 108 } 110 - 111 - extern void vmem_map_init(void); 112 109 113 110 /* 114 111 * paging_init() sets up the page tables
+1 -1
drivers/s390/block/dasd.c
··· 37 37 */ 38 38 debug_info_t *dasd_debug_area; 39 39 struct dasd_discipline *dasd_diag_discipline_pointer; 40 + void dasd_int_handler(struct ccw_device *, unsigned long, struct irb *); 40 41 41 42 MODULE_AUTHOR("Holger Smolinski <Holger.Smolinski@de.ibm.com>"); 42 43 MODULE_DESCRIPTION("Linux on S/390 DASD device driver," ··· 52 51 static void dasd_setup_queue(struct dasd_device * device); 53 52 static void dasd_free_queue(struct dasd_device * device); 54 53 static void dasd_flush_request_queue(struct dasd_device *); 55 - static void dasd_int_handler(struct ccw_device *, unsigned long, struct irb *); 56 54 static int dasd_flush_ccw_queue(struct dasd_device *, int); 57 55 static void dasd_tasklet(struct dasd_device *); 58 56 static void do_kick_device(struct work_struct *);
+2 -2
drivers/s390/block/dasd_diag.c
··· 43 43 #define DIAG_MAX_RETRIES 32 44 44 #define DIAG_TIMEOUT 50 * HZ 45 45 46 - struct dasd_discipline dasd_diag_discipline; 46 + static struct dasd_discipline dasd_diag_discipline; 47 47 48 48 struct dasd_diag_private { 49 49 struct dasd_diag_characteristics rdc_data; ··· 576 576 "dump sense not available for DIAG data"); 577 577 } 578 578 579 - struct dasd_discipline dasd_diag_discipline = { 579 + static struct dasd_discipline dasd_diag_discipline = { 580 580 .owner = THIS_MODULE, 581 581 .name = "DIAG", 582 582 .ebcname = "DIAG",
+1 -1
drivers/s390/block/dasd_eckd.c
··· 548 548 /* 549 549 * Build CP for Perform Subsystem Function - SSC. 550 550 */ 551 - struct dasd_ccw_req * 551 + static struct dasd_ccw_req * 552 552 dasd_eckd_build_psf_ssc(struct dasd_device *device) 553 553 { 554 554 struct dasd_ccw_req *cqr;
+1 -1
drivers/s390/block/dasd_genhd.c
··· 147 147 */ 148 148 memset(&bpart, 0, sizeof(struct blkpg_partition)); 149 149 memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); 150 - barg.data = (void __user *) &bpart; 150 + barg.data = (void __force __user *) &bpart; 151 151 barg.op = BLKPG_DEL_PARTITION; 152 152 for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) 153 153 ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg);
+1 -1
drivers/s390/block/dasd_proc.c
··· 168 168 } 169 169 170 170 static inline char * 171 - dasd_statistics_array(char *str, int *array, int shift) 171 + dasd_statistics_array(char *str, unsigned int *array, int shift) 172 172 { 173 173 int i; 174 174
+1 -1
drivers/s390/char/con3215.c
··· 1121 1121 * 3215 tty registration code called from tty_init(). 1122 1122 * Most kernel services (incl. kmalloc) are available at this poimt. 1123 1123 */ 1124 - int __init 1124 + static int __init 1125 1125 tty3215_init(void) 1126 1126 { 1127 1127 struct tty_driver *driver;
+1 -2
drivers/s390/char/con3270.c
··· 69 69 /* 70 70 * Setup timeout for a device. On timeout trigger an update. 71 71 */ 72 - void 73 - con3270_set_timer(struct con3270 *cp, int expires) 72 + static void con3270_set_timer(struct con3270 *cp, int expires) 74 73 { 75 74 if (expires == 0) { 76 75 if (timer_pending(&cp->timer))
+2
drivers/s390/char/defkeymap.c
··· 5 5 #include <linux/types.h> 6 6 #include <linux/keyboard.h> 7 7 #include <linux/kd.h> 8 + #include <linux/kbd_kern.h> 9 + #include <linux/kbd_diacr.h> 8 10 9 11 u_short plain_map[NR_KEYS] = { 10 12 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
+2 -2
drivers/s390/char/fs3270.c
··· 23 23 #include "raw3270.h" 24 24 #include "ctrlchar.h" 25 25 26 - struct raw3270_fn fs3270_fn; 26 + static struct raw3270_fn fs3270_fn; 27 27 28 28 struct fs3270 { 29 29 struct raw3270_view view; ··· 401 401 } 402 402 403 403 /* View to a 3270 device. Can be console, tty or fullscreen. */ 404 - struct raw3270_fn fs3270_fn = { 404 + static struct raw3270_fn fs3270_fn = { 405 405 .activate = fs3270_activate, 406 406 .deactivate = fs3270_deactivate, 407 407 .intv = (void *) fs3270_irq,
+2
drivers/s390/char/keyboard.c
··· 148 148 } 149 149 } 150 150 151 + #if 0 151 152 /* 152 153 * Generate ebcdic -> ascii translation table from kbd_data. 153 154 */ ··· 174 173 } 175 174 } 176 175 } 176 + #endif 177 177 178 178 /* 179 179 * We have a combining character DIACR here, followed by the character CH.
+2 -2
drivers/s390/char/raw3270.c
··· 29 29 #include <linux/device.h> 30 30 #include <linux/mutex.h> 31 31 32 - struct class *class3270; 32 + static struct class *class3270; 33 33 34 34 /* The main 3270 data structure. */ 35 35 struct raw3270 { ··· 86 86 /* 87 87 * Encode array for 12 bit 3270 addresses. 88 88 */ 89 - unsigned char raw3270_ebcgraf[64] = { 89 + static unsigned char raw3270_ebcgraf[64] = { 90 90 0x40, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 91 91 0xc8, 0xc9, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 92 92 0x50, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
+1 -1
drivers/s390/char/sclp_tty.c
··· 721 721 .ioctl = sclp_tty_ioctl, 722 722 }; 723 723 724 - int __init 724 + static int __init 725 725 sclp_tty_init(void) 726 726 { 727 727 struct tty_driver *driver;
+1 -1
drivers/s390/char/sclp_vt220.c
··· 669 669 /* 670 670 * Register driver with SCLP and Linux and initialize internal tty structures. 671 671 */ 672 - int __init 672 + static int __init 673 673 sclp_vt220_tty_init(void) 674 674 { 675 675 struct tty_driver *driver;
+4 -4
drivers/s390/char/tape_char.c
··· 137 137 /* 138 138 * Tape device read function 139 139 */ 140 - ssize_t 140 + static ssize_t 141 141 tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos) 142 142 { 143 143 struct tape_device *device; ··· 201 201 /* 202 202 * Tape device write function 203 203 */ 204 - ssize_t 204 + static ssize_t 205 205 tapechar_write(struct file *filp, const char __user *data, size_t count, loff_t *ppos) 206 206 { 207 207 struct tape_device *device; ··· 291 291 /* 292 292 * Character frontend tape device open function. 293 293 */ 294 - int 294 + static int 295 295 tapechar_open (struct inode *inode, struct file *filp) 296 296 { 297 297 struct tape_device *device; ··· 326 326 * Character frontend tape device release function. 327 327 */ 328 328 329 - int 329 + static int 330 330 tapechar_release(struct inode *inode, struct file *filp) 331 331 { 332 332 struct tape_device *device;
+5 -8
drivers/s390/char/tty3270.c
··· 36 36 struct tty_driver *tty3270_driver; 37 37 static int tty3270_max_index; 38 38 39 - struct raw3270_fn tty3270_fn; 39 + static struct raw3270_fn tty3270_fn; 40 40 41 41 struct tty3270_cell { 42 42 unsigned char character; ··· 119 119 /* 120 120 * Setup timeout for a device. On timeout trigger an update. 121 121 */ 122 - void 123 - tty3270_set_timer(struct tty3270 *tp, int expires) 122 + static void tty3270_set_timer(struct tty3270 *tp, int expires) 124 123 { 125 124 if (expires == 0) { 126 125 if (timer_pending(&tp->timer) && del_timer(&tp->timer)) ··· 840 841 } 841 842 } 842 843 843 - struct raw3270_fn tty3270_fn = { 844 + static struct raw3270_fn tty3270_fn = { 844 845 .activate = tty3270_activate, 845 846 .deactivate = tty3270_deactivate, 846 847 .intv = (void *) tty3270_irq, ··· 1753 1754 .set_termios = tty3270_set_termios 1754 1755 }; 1755 1756 1756 - void 1757 - tty3270_notifier(int index, int active) 1757 + static void tty3270_notifier(int index, int active) 1758 1758 { 1759 1759 if (active) 1760 1760 tty_register_device(tty3270_driver, index, NULL); ··· 1765 1767 * 3270 tty registration code called from tty_init(). 1766 1768 * Most kernel services (incl. kmalloc) are available at this poimt. 1767 1769 */ 1768 - int __init 1769 - tty3270_init(void) 1770 + static int __init tty3270_init(void) 1770 1771 { 1771 1772 struct tty_driver *driver; 1772 1773 int ret;
+2 -3
drivers/s390/char/vmlogrdr.c
··· 128 128 .MessagePending = vmlogrdr_iucv_MessagePending, 129 129 }; 130 130 131 - 132 - DECLARE_WAIT_QUEUE_HEAD(conn_wait_queue); 133 - DECLARE_WAIT_QUEUE_HEAD(read_wait_queue); 131 + static DECLARE_WAIT_QUEUE_HEAD(conn_wait_queue); 132 + static DECLARE_WAIT_QUEUE_HEAD(read_wait_queue); 134 133 135 134 /* 136 135 * pointer to system service private structure
+1 -1
drivers/s390/cio/blacklist.c
··· 126 126 static inline int 127 127 blacklist_parse_parameters (char *str, range_action action) 128 128 { 129 - unsigned int from, to, from_id0, to_id0, from_ssid, to_ssid; 129 + int from, to, from_id0, to_id0, from_ssid, to_ssid; 130 130 131 131 while (*str != 0 && *str != '\n') { 132 132 range_action ra = action;
+3
drivers/s390/cio/chsc.h
··· 47 47 extern void s390_process_css( void ); 48 48 extern void chsc_validate_chpids(struct subchannel *); 49 49 extern void chpid_is_actually_online(int); 50 + extern int css_get_ssd_info(struct subchannel *); 51 + extern int chsc_process_crw(void); 52 + extern int chp_process_crw(int, int); 50 53 51 54 struct css_general_char { 52 55 u64 : 41;
+1 -4
drivers/s390/cio/css.c
··· 108 108 } 109 109 } 110 110 111 - extern int css_get_ssd_info(struct subchannel *sch); 112 - 113 - 114 111 int css_sch_device_register(struct subchannel *sch) 115 112 { 116 113 int ret; ··· 414 417 need_reprobe); 415 418 } 416 419 417 - DECLARE_WORK(css_reprobe_work, reprobe_all); 420 + static DECLARE_WORK(css_reprobe_work, reprobe_all); 418 421 419 422 /* Schedule reprobing of all unregistered subchannels. */ 420 423 void css_schedule_reprobe(void)
+2
drivers/s390/cio/css.h
··· 143 143 extern struct subchannel * get_subchannel_by_schid(struct subchannel_id); 144 144 extern int css_init_done; 145 145 extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *); 146 + extern int css_process_crw(int, int); 147 + extern void css_reiterate_subchannels(void); 146 148 147 149 #define __MAX_SUBCHANNEL 65535 148 150 #define __MAX_SSID 3
-1
drivers/s390/cio/device.c
··· 138 138 139 139 static int io_subchannel_probe (struct subchannel *); 140 140 static int io_subchannel_remove (struct subchannel *); 141 - void io_subchannel_irq (struct device *); 142 141 static int io_subchannel_notify(struct device *, int); 143 142 static void io_subchannel_verify(struct device *); 144 143 static void io_subchannel_ioterm(struct device *);
+2
drivers/s390/cio/device.h
··· 74 74 extern wait_queue_head_t ccw_device_init_wq; 75 75 extern atomic_t ccw_device_init_count; 76 76 77 + void io_subchannel_irq (struct device *pdev); 77 78 void io_subchannel_recog_done(struct ccw_device *cdev); 78 79 79 80 int ccw_device_cancel_halt_clear(struct ccw_device *); ··· 119 118 /* qdio needs this. */ 120 119 void ccw_device_set_timeout(struct ccw_device *, int); 121 120 extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *); 121 + extern struct bus_type ccw_bus_type; 122 122 123 123 /* Channel measurement facility related */ 124 124 void retry_set_schib(struct ccw_device *cdev);
+1 -1
drivers/s390/cio/device_fsm.c
··· 892 892 /* 893 893 * Got an interrupt for a basic sense. 894 894 */ 895 - void 895 + static void 896 896 ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) 897 897 { 898 898 struct irb *irb;
+1 -2
drivers/s390/cio/qdio.c
··· 66 66 /******************** HERE WE GO ***********************************/ 67 67 68 68 static const char version[] = "QDIO base support version 2"; 69 - extern struct bus_type ccw_bus_type; 70 69 71 70 static int qdio_performance_stats = 0; 72 71 static int proc_perf_file_registration; ··· 3013 3014 return 0; 3014 3015 } 3015 3016 3016 - int qdio_fill_irq(struct qdio_initialize *init_data) 3017 + static int qdio_fill_irq(struct qdio_initialize *init_data) 3017 3018 { 3018 3019 int i; 3019 3020 char dbf_text[15];
+2 -2
drivers/s390/crypto/zcrypt_api.c
··· 791 791 return rc; 792 792 } 793 793 794 - long zcrypt_compat_ioctl(struct file *filp, unsigned int cmd, 794 + static long zcrypt_compat_ioctl(struct file *filp, unsigned int cmd, 795 795 unsigned long arg) 796 796 { 797 797 if (cmd == ICARSAMODEXPO) ··· 943 943 zcrypt_qdepth_mask(workarea); 944 944 len += sprinthx("Waiting work element counts", 945 945 resp_buff+len, workarea, AP_DEVICES); 946 - zcrypt_perdev_reqcnt((unsigned int *) workarea); 946 + zcrypt_perdev_reqcnt((int *) workarea); 947 947 len += sprinthx4("Per-device successfully completed request counts", 948 948 resp_buff+len,(unsigned int *) workarea, AP_DEVICES); 949 949 *eof = 1;
+2 -1
drivers/s390/crypto/zcrypt_pcixcc.c
··· 709 709 * PCIXCC/CEX2C device to the request distributor 710 710 * @xcRB: pointer to the send_cprb request buffer 711 711 */ 712 - long zcrypt_pcixcc_send_cprb(struct zcrypt_device *zdev, struct ica_xcRB *xcRB) 712 + static long zcrypt_pcixcc_send_cprb(struct zcrypt_device *zdev, 713 + struct ica_xcRB *xcRB) 713 714 { 714 715 struct ap_message ap_msg; 715 716 struct response_type resp_type = {
+1 -1
drivers/s390/net/claw.c
··· 121 121 #define DEBUG 122 122 #endif 123 123 124 - char debug_buffer[255]; 124 + static char debug_buffer[255]; 125 125 /** 126 126 * Debug Facility Stuff 127 127 */
+1 -1
drivers/s390/net/cu3088.c
··· 57 57 58 58 static struct ccw_driver cu3088_driver; 59 59 60 - struct device *cu3088_root_dev; 60 + static struct device *cu3088_root_dev; 61 61 62 62 static ssize_t 63 63 group_write(struct device_driver *drv, const char *buf, size_t count)
+3 -3
drivers/s390/net/lcs.c
··· 828 828 /** 829 829 * Emit buffer of a lan comand. 830 830 */ 831 - void 831 + static void 832 832 lcs_lancmd_timeout(unsigned long data) 833 833 { 834 834 struct lcs_reply *reply, *list_reply, *r; ··· 1360 1360 return 0; 1361 1361 } 1362 1362 1363 - void 1363 + static void 1364 1364 lcs_schedule_recovery(struct lcs_card *card) 1365 1365 { 1366 1366 LCS_DBF_TEXT(2, trace, "startrec"); ··· 1990 1990 1991 1991 } 1992 1992 1993 - DEVICE_ATTR(lancmd_timeout, 0644, lcs_timeout_show, lcs_timeout_store); 1993 + static DEVICE_ATTR(lancmd_timeout, 0644, lcs_timeout_show, lcs_timeout_store); 1994 1994 1995 1995 static ssize_t 1996 1996 lcs_dev_recover_store(struct device *dev, struct device_attribute *attr,
+2 -2
drivers/s390/net/netiucv.c
··· 2053 2053 return ret; 2054 2054 } 2055 2055 2056 - DRIVER_ATTR(connection, 0200, NULL, conn_write); 2056 + static DRIVER_ATTR(connection, 0200, NULL, conn_write); 2057 2057 2058 2058 static ssize_t 2059 2059 remove_write (struct device_driver *drv, const char *buf, size_t count) ··· 2112 2112 return -EINVAL; 2113 2113 } 2114 2114 2115 - DRIVER_ATTR(remove, 0200, NULL, remove_write); 2115 + static DRIVER_ATTR(remove, 0200, NULL, remove_write); 2116 2116 2117 2117 static void 2118 2118 netiucv_banner(void)
+1 -1
drivers/s390/net/qeth_sys.c
··· 998 998 .store = _store, \ 999 999 }; 1000 1000 1001 - int 1001 + static int 1002 1002 qeth_check_layer2(struct qeth_card *card) 1003 1003 { 1004 1004 if (card->options.layer2)
+5 -9
drivers/s390/s390mach.c
··· 13 13 #include <linux/errno.h> 14 14 #include <linux/workqueue.h> 15 15 #include <linux/time.h> 16 + #include <linux/device.h> 16 17 #include <linux/kthread.h> 17 18 18 19 #include <asm/lowcore.h> 19 - 20 + #include <asm/cio.h> 21 + #include "cio/cio.h" 22 + #include "cio/chsc.h" 23 + #include "cio/css.h" 20 24 #include "s390mach.h" 21 25 22 26 static struct semaphore m_sem; 23 - 24 - extern int css_process_crw(int, int); 25 - extern int chsc_process_crw(void); 26 - extern int chp_process_crw(int, int); 27 - extern void css_reiterate_subchannels(void); 28 - 29 - extern struct workqueue_struct *slow_path_wq; 30 - extern struct work_struct slow_path_work; 31 27 32 28 static NORET_TYPE void 33 29 s390_handle_damage(char *msg)
+3 -3
drivers/s390/scsi/zfcp_dbf.c
··· 469 469 return len; 470 470 } 471 471 472 - struct debug_view zfcp_hba_dbf_view = { 472 + static struct debug_view zfcp_hba_dbf_view = { 473 473 "structured", 474 474 NULL, 475 475 &zfcp_dbf_view_header, ··· 693 693 return len; 694 694 } 695 695 696 - struct debug_view zfcp_san_dbf_view = { 696 + static struct debug_view zfcp_san_dbf_view = { 697 697 "structured", 698 698 NULL, 699 699 &zfcp_dbf_view_header, ··· 884 884 return len; 885 885 } 886 886 887 - struct debug_view zfcp_scsi_dbf_view = { 887 + static struct debug_view zfcp_scsi_dbf_view = { 888 888 "structured", 889 889 NULL, 890 890 &zfcp_dbf_view_header,
+3 -4
drivers/s390/scsi/zfcp_erp.c
··· 200 200 * returns: 0 - initiated action successfully 201 201 * <0 - failed to initiate action 202 202 */ 203 - int 203 + static int 204 204 zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter, int clear_mask) 205 205 { 206 206 int retval; ··· 295 295 * zfcp_erp_adisc - send ADISC ELS command 296 296 * @port: port structure 297 297 */ 298 - int 298 + static int 299 299 zfcp_erp_adisc(struct zfcp_port *port) 300 300 { 301 301 struct zfcp_adapter *adapter = port->adapter; ··· 380 380 * 381 381 * If ADISC failed (LS_RJT or timed out) forced reopen of the port is triggered. 382 382 */ 383 - void 383 + static void 384 384 zfcp_erp_adisc_handler(unsigned long data) 385 385 { 386 386 struct zfcp_send_els *send_els; ··· 3141 3141 break; 3142 3142 case ZFCP_ERP_ACTION_REOPEN_ADAPTER: 3143 3143 if (result != ZFCP_ERP_SUCCEEDED) { 3144 - struct zfcp_port *port; 3145 3144 list_for_each_entry(port, &adapter->port_list_head, list) 3146 3145 if (port->rport && 3147 3146 !atomic_test_mask(ZFCP_STATUS_PORT_WKA,
+2 -2
drivers/s390/scsi/zfcp_ext.h
··· 119 119 extern void zfcp_adapter_scsi_unregister(struct zfcp_adapter *); 120 120 extern void zfcp_set_fcp_dl(struct fcp_cmnd_iu *, fcp_dl_t); 121 121 extern char *zfcp_get_fcp_rsp_info_ptr(struct fcp_rsp_iu *); 122 - extern void set_host_byte(u32 *, char); 123 - extern void set_driver_byte(u32 *, char); 122 + extern void set_host_byte(int *, char); 123 + extern void set_driver_byte(int *, char); 124 124 extern char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *); 125 125 extern fcp_dl_t zfcp_get_fcp_dl(struct fcp_cmnd_iu *); 126 126
+9 -9
drivers/s390/scsi/zfcp_scsi.c
··· 90 90 return fcp_sns_info_ptr; 91 91 } 92 92 93 - fcp_dl_t * 93 + static fcp_dl_t * 94 94 zfcp_get_fcp_dl_ptr(struct fcp_cmnd_iu * fcp_cmd) 95 95 { 96 96 int additional_length = fcp_cmd->add_fcp_cdb_length << 2; ··· 124 124 * regarding the specified byte 125 125 */ 126 126 static inline void 127 - set_byte(u32 * result, char status, char pos) 127 + set_byte(int *result, char status, char pos) 128 128 { 129 129 *result |= status << (pos * 8); 130 130 } 131 131 132 132 void 133 - set_host_byte(u32 * result, char status) 133 + set_host_byte(int *result, char status) 134 134 { 135 135 set_byte(result, status, 2); 136 136 } 137 137 138 138 void 139 - set_driver_byte(u32 * result, char status) 139 + set_driver_byte(int *result, char status) 140 140 { 141 141 set_byte(result, status, 3); 142 142 } ··· 280 280 return retval; 281 281 } 282 282 283 - void 283 + static void 284 284 zfcp_scsi_command_sync_handler(struct scsi_cmnd *scpnt) 285 285 { 286 286 struct completion *wait = (struct completion *) scpnt->SCp.ptr; ··· 324 324 * returns: 0 - success, SCSI command enqueued 325 325 * !0 - failure 326 326 */ 327 - int 327 + static int 328 328 zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt, 329 329 void (*done) (struct scsi_cmnd *)) 330 330 { ··· 380 380 * will handle late commands. (Usually, the normal completion of late 381 381 * commands is ignored with respect to the running abort operation.) 382 382 */ 383 - int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) 383 + static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) 384 384 { 385 385 struct Scsi_Host *scsi_host; 386 386 struct zfcp_adapter *adapter; ··· 445 445 return retval; 446 446 } 447 447 448 - int 448 + static int 449 449 zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) 450 450 { 451 451 int retval; ··· 541 541 /** 542 542 * zfcp_scsi_eh_host_reset_handler - handler for host and bus reset 543 543 */ 544 - int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) 544 + static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) 545 545 { 546 546 struct zfcp_unit *unit; 547 547 struct zfcp_adapter *adapter;
+2 -1
include/asm-s390/kdebug.h
··· 26 26 extern int unregister_page_fault_notifier(struct notifier_block *); 27 27 extern struct atomic_notifier_head s390die_chain; 28 28 29 - 30 29 enum die_val { 31 30 DIE_OOPS = 1, 32 31 DIE_BPT, ··· 54 55 }; 55 56 return atomic_notifier_call_chain(&s390die_chain, val, &args); 56 57 } 58 + 59 + extern void die(const char *, struct pt_regs *, long); 57 60 58 61 #endif
+1
include/asm-s390/pgtable.h
··· 40 40 41 41 extern pgd_t swapper_pg_dir[] __attribute__ ((aligned (4096))); 42 42 extern void paging_init(void); 43 + extern void vmem_map_init(void); 43 44 44 45 /* 45 46 * The S390 doesn't have any external MMU info: the kernel page
+3
include/asm-s390/setup.h
··· 74 74 extern unsigned int console_devno; 75 75 extern unsigned int console_irq; 76 76 77 + extern char vmhalt_cmd[]; 78 + extern char vmpoff_cmd[]; 79 + 77 80 #define CONSOLE_IS_UNDEFINED (console_mode == 0) 78 81 #define CONSOLE_IS_SCLP (console_mode == 1) 79 82 #define CONSOLE_IS_3215 (console_mode == 2)
+4
include/asm-s390/smp.h
··· 31 31 __u16 cpu; 32 32 } sigp_info; 33 33 34 + extern void machine_restart_smp(char *); 35 + extern void machine_halt_smp(void); 36 + extern void machine_power_off_smp(void); 37 + 34 38 extern void smp_setup_cpu_possible_map(void); 35 39 extern int smp_call_function_on(void (*func) (void *info), void *info, 36 40 int nonatomic, int wait, int cpu);
+3
include/asm-s390/timer.h
··· 45 45 extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); 46 46 extern int del_virt_timer(struct vtimer_list *timer); 47 47 48 + extern void init_cpu_vtimer(void); 49 + extern void vtime_init(void); 50 + 48 51 #endif /* __KERNEL__ */ 49 52 50 53 #endif /* _ASM_S390_TIMER_H */
+2
include/asm-s390/timex.h
··· 32 32 return (cycles_t) get_clock() >> 2; 33 33 } 34 34 35 + void init_cpu_timer(void); 36 + 35 37 #endif