From 7f93f6dd3bb43e0ee32a3edf496fb84f74a51ce8 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 8 Mar 2005 16:12:28 -0800 Subject: [PATCH] Sparse annotations and cleanup warnings for PA-RISC - Missing UL on large integers - 0/NULL confusion - __user annotations - C99-style array elements Signed-off-by: Randolph Chung Signed-off-by: Matthew Wilcox Signed-off-by: Linus Torvalds --- include/asm-parisc/checksum.h | 4 ++-- include/asm-parisc/compat.h | 8 ++++---- include/asm-parisc/signal.h | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h index f8bfc4c72236..229cb56fdb7a 100644 --- a/include/asm-parisc/checksum.h +++ b/include/asm-parisc/checksum.h @@ -30,8 +30,8 @@ extern unsigned int csum_partial_copy_nocheck(const unsigned char *, unsigned ch * this is a new version of the above that records errors it finds in *errp, * but continues and zeros the rest of the buffer. */ -extern unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, - int len, unsigned int sum, int *errp); +extern unsigned int csum_partial_copy_from_user(const unsigned char __user *src, + unsigned char *dst, int len, unsigned int sum, int *errp); /* * Optimized for IP headers, which always checksum on 4 octet boundaries. diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 3edb5db3eace..ca0eac647a05 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h @@ -131,15 +131,15 @@ typedef u32 compat_sigset_word; */ typedef u32 compat_uptr_t; -static inline void *compat_ptr(compat_uptr_t uptr) +static inline void __user *compat_ptr(compat_uptr_t uptr) { - return (void *)(unsigned long)uptr; + return (void __user *)(unsigned long)uptr; } -static __inline__ void *compat_alloc_user_space(long len) +static __inline__ void __user *compat_alloc_user_space(long len) { struct pt_regs *regs = ¤t->thread.regs; - return (void *)regs->gr[30]; + return (void __user *)regs->gr[30]; } #endif /* _ASM_PARISC_COMPAT_H */ diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index cd4beefef333..358f577c8eb8 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h @@ -123,13 +123,14 @@ struct siginfo; * compiler doesn't support code which changes or tests the address of * the function in the little struct. This is really ugly -PB */ -typedef __kernel_caddr_t __sighandler_t; +typedef char __user *__sighandler_t; #else -typedef void (*__sighandler_t)(int); +typedef void __signalfn_t(int); +typedef __signalfn_t __user *__sighandler_t; #endif typedef struct sigaltstack { - void *ss_sp; + void __user *ss_sp; int ss_flags; size_t ss_size; } stack_t; -- cgit v1.2.3