aboutsummaryrefslogtreecommitdiff
path: root/include/asm-s390
diff options
context:
space:
mode:
authorMartin Schwidefsky2006-01-06 00:19:09 -0800
committerLinus Torvalds2006-01-06 08:33:49 -0800
commita63a4931c301a14ca79c41fec0b99d898dbba1fb (patch)
tree8d543006aadc1518c8bdb195f357d321b62b15da /include/asm-s390
parent56dc6a88ec76019e0d0729165cb5b98536270e1d (diff)
[PATCH] s390: uaccess warnings
Convert __access_ok to an inline C function and change __get_user primitive to avoid uaccess compiler warnings. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-s390')
-rw-r--r--include/asm-s390/uaccess.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
index 10a619da4761..be104f21c70a 100644
--- a/include/asm-s390/uaccess.h
+++ b/include/asm-s390/uaccess.h
@@ -61,8 +61,10 @@
#define segment_eq(a,b) ((a).ar4 == (b).ar4)
-#define __access_ok(addr,size) (1)
-
+static inline int __access_ok(const void *addr, unsigned long size)
+{
+ return 1;
+}
#define access_ok(type,addr,size) __access_ok(addr,size)
/*
@@ -206,25 +208,25 @@ extern int __put_user_bad(void) __attribute__((noreturn));
case 1: { \
unsigned char __x; \
__get_user_asm(__x, ptr, __gu_err); \
- (x) = (__typeof__(*(ptr))) __x; \
+ (x) = *(__typeof__(*(ptr)) *) &__x; \
break; \
}; \
case 2: { \
unsigned short __x; \
__get_user_asm(__x, ptr, __gu_err); \
- (x) = (__typeof__(*(ptr))) __x; \
+ (x) = *(__typeof__(*(ptr)) *) &__x; \
break; \
}; \
case 4: { \
unsigned int __x; \
__get_user_asm(__x, ptr, __gu_err); \
- (x) = (__typeof__(*(ptr))) __x; \
+ (x) = *(__typeof__(*(ptr)) *) &__x; \
break; \
}; \
case 8: { \
unsigned long long __x; \
__get_user_asm(__x, ptr, __gu_err); \
- (x) = (__typeof__(*(ptr))) __x; \
+ (x) = *(__typeof__(*(ptr)) *) &__x; \
break; \
}; \
default: \