diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-07-12 16:41:55 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-07-12 16:41:55 +0200 |
commit | d2c993d845781d160a7ef759a3e65c6892c4a270 (patch) | |
tree | f63be38ab83363282c519048849663201f664818 /arch/s390/kernel | |
parent | 7e560814de1972e1bfc780616841d7a0032ca467 (diff) |
[S390] Fix 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_linux.c | 19 | ||||
-rw-r--r-- | arch/s390/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/profile.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ext.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 18 |
7 files changed, 26 insertions, 21 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index cabb4ff54cd..785c9f70ac9 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -409,7 +409,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) mm_segment_t old_fs = get_fs (); set_fs (KERNEL_DS); - ret = sys_sysinfo(&s); + ret = sys_sysinfo((struct sysinfo __user *) &s); set_fs (old_fs); err = put_user (s.uptime, &info->uptime); err |= __put_user (s.loads[0], &info->loads[0]); @@ -438,7 +438,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, mm_segment_t old_fs = get_fs (); set_fs (KERNEL_DS); - ret = sys_sched_rr_get_interval(pid, &t); + ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t); set_fs (old_fs); if (put_compat_timespec(&t, interval)) return -EFAULT; @@ -464,7 +464,10 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, } } set_fs (KERNEL_DS); - ret = sys_rt_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL, sigsetsize); + ret = sys_rt_sigprocmask(how, + set ? (sigset_t __user *) &s : NULL, + oset ? (sigset_t __user *) &s : NULL, + sigsetsize); set_fs (old_fs); if (ret) return ret; if (oset) { @@ -489,7 +492,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, mm_segment_t old_fs = get_fs(); set_fs (KERNEL_DS); - ret = sys_rt_sigpending(&s, sigsetsize); + ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize); set_fs (old_fs); if (!ret) { switch (_NSIG_WORDS) { @@ -514,7 +517,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) if (copy_siginfo_from_user32(&info, uinfo)) return -EFAULT; set_fs (KERNEL_DS); - ret = sys_rt_sigqueueinfo(pid, sig, &info); + ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); set_fs (old_fs); return ret; } @@ -674,7 +677,8 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse return -EFAULT; set_fs(KERNEL_DS); - ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count); + ret = sys_sendfile(out_fd, in_fd, + offset ? (off_t __user *) &of : NULL, count); set_fs(old_fs); if (offset && put_user(of, offset)) @@ -694,7 +698,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, return -EFAULT; set_fs(KERNEL_DS); - ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count); + ret = sys_sendfile64(out_fd, in_fd, + offset ? (loff_t __user *) &lof : NULL, count); set_fs(old_fs); if (offset && put_user(lof, offset)) diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index c271cdab58e..d989ed45a7a 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -119,7 +119,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, int nrela, i, j; /* Find symbol table and string table. */ - symtab = 0; + symtab = NULL; for (i = 0; i < hdr->e_shnum; i++) switch (sechdrs[i].sh_type) { case SHT_SYMTAB: diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 78c8e5548ca..d3cbfa3005e 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -172,7 +172,7 @@ void show_regs(struct pt_regs *regs) show_registers(regs); /* Show stack backtrace if pt_regs is from kernel mode */ if (!(regs->psw.mask & PSW_MASK_PSTATE)) - show_trace(0,(unsigned long *) regs->gprs[15]); + show_trace(NULL, (unsigned long *) regs->gprs[15]); } extern void kernel_thread_starter(void); diff --git a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c index 7ba777eec1a..b81aa1f569c 100644 --- a/arch/s390/kernel/profile.c +++ b/arch/s390/kernel/profile.c @@ -13,7 +13,7 @@ static struct proc_dir_entry * root_irq_dir; void init_irq_proc(void) { /* create /proc/irq */ - root_irq_dir = proc_mkdir("irq", 0); + root_irq_dir = proc_mkdir("irq", NULL); /* create /proc/irq/prof_cpu_mask */ create_prof_cpu_mask(root_irq_dir); diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index 207bc511a6e..c1b383537fe 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c @@ -24,7 +24,7 @@ * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000 * iucv and 0x2603 pfault) this is always the first element. */ -ext_int_info_t *ext_int_hash[256] = { 0, }; +ext_int_info_t *ext_int_hash[256] = { NULL, }; static inline int ext_hash(__u16 code) { diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index f7fe9bc4339..74e6178fbaf 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -379,7 +379,7 @@ void __init time_init(void) -xtime.tv_sec, -xtime.tv_nsec); /* request the clock comparator external interrupt */ - if (register_early_external_interrupt(0x1004, 0, + if (register_early_external_interrupt(0x1004, NULL, &ext_int_info_cc) != 0) panic("Couldn't request external interrupt 0x1004"); diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 12240c03a6d..bde1d1d5985 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -170,7 +170,7 @@ void show_stack(struct task_struct *task, unsigned long *sp) */ void dump_stack(void) { - show_stack(0, 0); + show_stack(NULL, NULL); } EXPORT_SYMBOL(dump_stack); @@ -331,9 +331,9 @@ static void inline do_trap(long interruption_code, int signr, char *str, } } -static inline void *get_check_address(struct pt_regs *regs) +static inline void __user *get_check_address(struct pt_regs *regs) { - return (void *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN); + return (void __user *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN); } void do_single_step(struct pt_regs *regs) @@ -360,7 +360,7 @@ asmlinkage void name(struct pt_regs * regs, long interruption_code) \ info.si_signo = signr; \ info.si_errno = 0; \ info.si_code = sicode; \ - info.si_addr = (void *)siaddr; \ + info.si_addr = siaddr; \ do_trap(interruption_code, signr, str, regs, &info); \ } @@ -392,7 +392,7 @@ DO_ERROR_INFO(SIGILL, "translation exception", translation_exception, ILL_ILLOPN, get_check_address(regs)) static inline void -do_fp_trap(struct pt_regs *regs, void *location, +do_fp_trap(struct pt_regs *regs, void __user *location, int fpc, long interruption_code) { siginfo_t si; @@ -424,10 +424,10 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) { siginfo_t info; __u8 opcode[6]; - __u16 *location; + __u16 __user *location; int signal = 0; - location = (__u16 *) get_check_address(regs); + location = get_check_address(regs); /* * We got all needed information from the lowcore and can @@ -559,10 +559,10 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception, asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) { - __u16 *location; + __u16 __user *location; int signal = 0; - location = (__u16 *) get_check_address(regs); + location = get_check_address(regs); /* * We got all needed information from the lowcore and can |