aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-07-12 10:41:55 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-12 10:41:55 -0400
commitd2c993d845781d160a7ef759a3e65c6892c4a270 (patch)
treef63be38ab83363282c519048849663201f664818 /arch
parent7e560814de1972e1bfc780616841d7a0032ca467 (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')
-rw-r--r--arch/s390/hypfs/hypfs_diag.c2
-rw-r--r--arch/s390/kernel/compat_linux.c19
-rw-r--r--arch/s390/kernel/module.c2
-rw-r--r--arch/s390/kernel/process.c2
-rw-r--r--arch/s390/kernel/profile.c2
-rw-r--r--arch/s390/kernel/s390_ext.c2
-rw-r--r--arch/s390/kernel/time.c2
-rw-r--r--arch/s390/kernel/traps.c18
-rw-r--r--arch/s390/lib/string.c4
-rw-r--r--arch/s390/mm/cmm.c2
-rw-r--r--arch/s390/mm/fault.c2
11 files changed, 31 insertions, 26 deletions
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index efa74af7f04a..1785bce2b919 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -403,7 +403,7 @@ static void *diag204_get_buffer(enum diag204_format fmt, int *pages)
403 *pages = 1; 403 *pages = 1;
404 return diag204_alloc_rbuf(); 404 return diag204_alloc_rbuf();
405 } else {/* INFO_EXT */ 405 } else {/* INFO_EXT */
406 *pages = diag204(SUBC_RSI | INFO_EXT, 0, 0); 406 *pages = diag204(SUBC_RSI | INFO_EXT, 0, NULL);
407 if (*pages <= 0) 407 if (*pages <= 0)
408 return ERR_PTR(-ENOSYS); 408 return ERR_PTR(-ENOSYS);
409 else 409 else
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index cabb4ff54cd7..785c9f70ac98 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)
409 mm_segment_t old_fs = get_fs (); 409 mm_segment_t old_fs = get_fs ();
410 410
411 set_fs (KERNEL_DS); 411 set_fs (KERNEL_DS);
412 ret = sys_sysinfo(&s); 412 ret = sys_sysinfo((struct sysinfo __user *) &s);
413 set_fs (old_fs); 413 set_fs (old_fs);
414 err = put_user (s.uptime, &info->uptime); 414 err = put_user (s.uptime, &info->uptime);
415 err |= __put_user (s.loads[0], &info->loads[0]); 415 err |= __put_user (s.loads[0], &info->loads[0]);
@@ -438,7 +438,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
438 mm_segment_t old_fs = get_fs (); 438 mm_segment_t old_fs = get_fs ();
439 439
440 set_fs (KERNEL_DS); 440 set_fs (KERNEL_DS);
441 ret = sys_sched_rr_get_interval(pid, &t); 441 ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t);
442 set_fs (old_fs); 442 set_fs (old_fs);
443 if (put_compat_timespec(&t, interval)) 443 if (put_compat_timespec(&t, interval))
444 return -EFAULT; 444 return -EFAULT;
@@ -464,7 +464,10 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
464 } 464 }
465 } 465 }
466 set_fs (KERNEL_DS); 466 set_fs (KERNEL_DS);
467 ret = sys_rt_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL, sigsetsize); 467 ret = sys_rt_sigprocmask(how,
468 set ? (sigset_t __user *) &s : NULL,
469 oset ? (sigset_t __user *) &s : NULL,
470 sigsetsize);
468 set_fs (old_fs); 471 set_fs (old_fs);
469 if (ret) return ret; 472 if (ret) return ret;
470 if (oset) { 473 if (oset) {
@@ -489,7 +492,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
489 mm_segment_t old_fs = get_fs(); 492 mm_segment_t old_fs = get_fs();
490 493
491 set_fs (KERNEL_DS); 494 set_fs (KERNEL_DS);
492 ret = sys_rt_sigpending(&s, sigsetsize); 495 ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize);
493 set_fs (old_fs); 496 set_fs (old_fs);
494 if (!ret) { 497 if (!ret) {
495 switch (_NSIG_WORDS) { 498 switch (_NSIG_WORDS) {
@@ -514,7 +517,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
514 if (copy_siginfo_from_user32(&info, uinfo)) 517 if (copy_siginfo_from_user32(&info, uinfo))
515 return -EFAULT; 518 return -EFAULT;
516 set_fs (KERNEL_DS); 519 set_fs (KERNEL_DS);
517 ret = sys_rt_sigqueueinfo(pid, sig, &info); 520 ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info);
518 set_fs (old_fs); 521 set_fs (old_fs);
519 return ret; 522 return ret;
520} 523}
@@ -674,7 +677,8 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse
674 return -EFAULT; 677 return -EFAULT;
675 678
676 set_fs(KERNEL_DS); 679 set_fs(KERNEL_DS);
677 ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count); 680 ret = sys_sendfile(out_fd, in_fd,
681 offset ? (off_t __user *) &of : NULL, count);
678 set_fs(old_fs); 682 set_fs(old_fs);
679 683
680 if (offset && put_user(of, offset)) 684 if (offset && put_user(of, offset))
@@ -694,7 +698,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
694 return -EFAULT; 698 return -EFAULT;
695 699
696 set_fs(KERNEL_DS); 700 set_fs(KERNEL_DS);
697 ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count); 701 ret = sys_sendfile64(out_fd, in_fd,
702 offset ? (loff_t __user *) &lof : NULL, count);
698 set_fs(old_fs); 703 set_fs(old_fs);
699 704
700 if (offset && put_user(lof, offset)) 705 if (offset && put_user(lof, offset))
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index c271cdab58e2..d989ed45a7aa 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,
119 int nrela, i, j; 119 int nrela, i, j;
120 120
121 /* Find symbol table and string table. */ 121 /* Find symbol table and string table. */
122 symtab = 0; 122 symtab = NULL;
123 for (i = 0; i < hdr->e_shnum; i++) 123 for (i = 0; i < hdr->e_shnum; i++)
124 switch (sechdrs[i].sh_type) { 124 switch (sechdrs[i].sh_type) {
125 case SHT_SYMTAB: 125 case SHT_SYMTAB:
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 78c8e5548caf..d3cbfa3005ec 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -172,7 +172,7 @@ void show_regs(struct pt_regs *regs)
172 show_registers(regs); 172 show_registers(regs);
173 /* Show stack backtrace if pt_regs is from kernel mode */ 173 /* Show stack backtrace if pt_regs is from kernel mode */
174 if (!(regs->psw.mask & PSW_MASK_PSTATE)) 174 if (!(regs->psw.mask & PSW_MASK_PSTATE))
175 show_trace(0,(unsigned long *) regs->gprs[15]); 175 show_trace(NULL, (unsigned long *) regs->gprs[15]);
176} 176}
177 177
178extern void kernel_thread_starter(void); 178extern void kernel_thread_starter(void);
diff --git a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c
index 7ba777eec1a8..b81aa1f569ca 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;
13void init_irq_proc(void) 13void init_irq_proc(void)
14{ 14{
15 /* create /proc/irq */ 15 /* create /proc/irq */
16 root_irq_dir = proc_mkdir("irq", 0); 16 root_irq_dir = proc_mkdir("irq", NULL);
17 17
18 /* create /proc/irq/prof_cpu_mask */ 18 /* create /proc/irq/prof_cpu_mask */
19 create_prof_cpu_mask(root_irq_dir); 19 create_prof_cpu_mask(root_irq_dir);
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index 207bc511a6e3..c1b383537fec 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -24,7 +24,7 @@
24 * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000 24 * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000
25 * iucv and 0x2603 pfault) this is always the first element. 25 * iucv and 0x2603 pfault) this is always the first element.
26 */ 26 */
27ext_int_info_t *ext_int_hash[256] = { 0, }; 27ext_int_info_t *ext_int_hash[256] = { NULL, };
28 28
29static inline int ext_hash(__u16 code) 29static inline int ext_hash(__u16 code)
30{ 30{
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index f7fe9bc43397..74e6178fbaf2 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -379,7 +379,7 @@ void __init time_init(void)
379 -xtime.tv_sec, -xtime.tv_nsec); 379 -xtime.tv_sec, -xtime.tv_nsec);
380 380
381 /* request the clock comparator external interrupt */ 381 /* request the clock comparator external interrupt */
382 if (register_early_external_interrupt(0x1004, 0, 382 if (register_early_external_interrupt(0x1004, NULL,
383 &ext_int_info_cc) != 0) 383 &ext_int_info_cc) != 0)
384 panic("Couldn't request external interrupt 0x1004"); 384 panic("Couldn't request external interrupt 0x1004");
385 385
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 12240c03a6dd..bde1d1d59858 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)
170 */ 170 */
171void dump_stack(void) 171void dump_stack(void)
172{ 172{
173 show_stack(0, 0); 173 show_stack(NULL, NULL);
174} 174}
175 175
176EXPORT_SYMBOL(dump_stack); 176EXPORT_SYMBOL(dump_stack);
@@ -331,9 +331,9 @@ static void inline do_trap(long interruption_code, int signr, char *str,
331 } 331 }
332} 332}
333 333
334static inline void *get_check_address(struct pt_regs *regs) 334static inline void __user *get_check_address(struct pt_regs *regs)
335{ 335{
336 return (void *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN); 336 return (void __user *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN);
337} 337}
338 338
339void do_single_step(struct pt_regs *regs) 339void do_single_step(struct pt_regs *regs)
@@ -360,7 +360,7 @@ asmlinkage void name(struct pt_regs * regs, long interruption_code) \
360 info.si_signo = signr; \ 360 info.si_signo = signr; \
361 info.si_errno = 0; \ 361 info.si_errno = 0; \
362 info.si_code = sicode; \ 362 info.si_code = sicode; \
363 info.si_addr = (void *)siaddr; \ 363 info.si_addr = siaddr; \
364 do_trap(interruption_code, signr, str, regs, &info); \ 364 do_trap(interruption_code, signr, str, regs, &info); \
365} 365}
366 366
@@ -392,7 +392,7 @@ DO_ERROR_INFO(SIGILL, "translation exception", translation_exception,
392 ILL_ILLOPN, get_check_address(regs)) 392 ILL_ILLOPN, get_check_address(regs))
393 393
394static inline void 394static inline void
395do_fp_trap(struct pt_regs *regs, void *location, 395do_fp_trap(struct pt_regs *regs, void __user *location,
396 int fpc, long interruption_code) 396 int fpc, long interruption_code)
397{ 397{
398 siginfo_t si; 398 siginfo_t si;
@@ -424,10 +424,10 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
424{ 424{
425 siginfo_t info; 425 siginfo_t info;
426 __u8 opcode[6]; 426 __u8 opcode[6];
427 __u16 *location; 427 __u16 __user *location;
428 int signal = 0; 428 int signal = 0;
429 429
430 location = (__u16 *) get_check_address(regs); 430 location = get_check_address(regs);
431 431
432 /* 432 /*
433 * We got all needed information from the lowcore and can 433 * We got all needed information from the lowcore and can
@@ -559,10 +559,10 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception,
559 559
560asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) 560asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
561{ 561{
562 __u16 *location; 562 __u16 __user *location;
563 int signal = 0; 563 int signal = 0;
564 564
565 location = (__u16 *) get_check_address(regs); 565 location = get_check_address(regs);
566 566
567 /* 567 /*
568 * We got all needed information from the lowcore and can 568 * We got all needed information from the lowcore and can
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c
index 8240cc77e06e..ae5cf5d03d41 100644
--- a/arch/s390/lib/string.c
+++ b/arch/s390/lib/string.c
@@ -233,7 +233,7 @@ char * strrchr(const char * s, int c)
233 if (s[len] == (char) c) 233 if (s[len] == (char) c)
234 return (char *) s + len; 234 return (char *) s + len;
235 } while (--len > 0); 235 } while (--len > 0);
236 return 0; 236 return NULL;
237} 237}
238EXPORT_SYMBOL(strrchr); 238EXPORT_SYMBOL(strrchr);
239 239
@@ -267,7 +267,7 @@ char * strstr(const char * s1,const char * s2)
267 return (char *) s1; 267 return (char *) s1;
268 s1++; 268 s1++;
269 } 269 }
270 return 0; 270 return NULL;
271} 271}
272EXPORT_SYMBOL(strstr); 272EXPORT_SYMBOL(strstr);
273 273
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 81be2fec7dc5..ceea51cff03b 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -161,7 +161,7 @@ cmm_thread(void *dummy)
161static void 161static void
162cmm_start_thread(void) 162cmm_start_thread(void)
163{ 163{
164 kernel_thread(cmm_thread, 0, 0); 164 kernel_thread(cmm_thread, NULL, 0);
165} 165}
166 166
167static void 167static void
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 833d5941746a..7cd82575813d 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -144,7 +144,7 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code,
144#endif 144#endif
145 si.si_signo = SIGSEGV; 145 si.si_signo = SIGSEGV;
146 si.si_code = si_code; 146 si.si_code = si_code;
147 si.si_addr = (void *) address; 147 si.si_addr = (void __user *) address;
148 force_sig_info(SIGSEGV, &si, current); 148 force_sig_info(SIGSEGV, &si, current);
149} 149}
150 150