diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-01 08:22:26 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-01 08:22:26 +0400 |
commit | 399f486286f44d55c4fff0e9cc5d712f2b443489 (patch) | |
tree | 0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /include/asm-h8300/uaccess.h | |
parent | 481419ec9fbdf3f4ec5389c7e91a81b4a7ebee8d (diff) | |
parent | a9edadbf790d72adf6ebed476cb5caf7743e7e4a (diff) | |
download | linux-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.h | 11 |
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) |