summaryrefslogtreecommitdiff
path: root/include/asm-h8300/uaccess.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 08:22:26 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 08:22:26 +0400
commit399f486286f44d55c4fff0e9cc5d712f2b443489 (patch)
tree0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /include/asm-h8300/uaccess.h
parent481419ec9fbdf3f4ec5389c7e91a81b4a7ebee8d (diff)
parenta9edadbf790d72adf6ebed476cb5caf7743e7e4a (diff)
downloadlinux-399f486286f44d55c4fff0e9cc5d712f2b443489.tar.xz
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'include/asm-h8300/uaccess.h')
-rw-r--r--include/asm-h8300/uaccess.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h
index a22350ec271a..356068cd0879 100644
--- a/include/asm-h8300/uaccess.h
+++ b/include/asm-h8300/uaccess.h
@@ -91,22 +91,19 @@ extern int __put_user_bad(void);
#define get_user(x, ptr) \
({ \
int __gu_err = 0; \
- uint32_t __gu_val = 0; \
+ typeof(*(ptr)) __gu_val = *ptr; \
switch (sizeof(*(ptr))) { \
case 1: \
case 2: \
case 4: \
- __gu_val = *(ptr); \
- break; \
- case 8: \
- memcpy(&__gu_val, ptr, sizeof (*(ptr))); \
+ case 8: \
break; \
default: \
- __gu_val = 0; \
__gu_err = __get_user_bad(); \
+ __gu_val = 0; \
break; \
} \
- (x) = (typeof(*(ptr)))__gu_val; \
+ (x) = __gu_val; \
__gu_err; \
})
#define __get_user(x, ptr) get_user(x, ptr)