summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@parisc-linux.org>2005-03-08 16:12:28 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-08 16:12:28 -0800
commit7f93f6dd3bb43e0ee32a3edf496fb84f74a51ce8 (patch)
treeefa6d2f63692040d936d6fd129334ce743e45476 /include
parentb6181a0a1999c7d4dd937d7f5234fb62eca68e89 (diff)
[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 <tausq@parisc-linux.org> Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-parisc/checksum.h4
-rw-r--r--include/asm-parisc/compat.h8
-rw-r--r--include/asm-parisc/signal.h7
3 files changed, 10 insertions, 9 deletions
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 = &current->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;