aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
91#define get_user(x, ptr) \ 91#define get_user(x, ptr) \
92({ \ 92({ \
93 int __gu_err = 0; \ 93 int __gu_err = 0; \
94 uint32_t __gu_val = 0; \ 94 typeof(*(ptr)) __gu_val = *ptr; \
95 switch (sizeof(*(ptr))) { \ 95 switch (sizeof(*(ptr))) { \
96 case 1: \ 96 case 1: \
97 case 2: \ 97 case 2: \
98 case 4: \ 98 case 4: \
99 __gu_val = *(ptr); \ 99 case 8: \
100 break; \
101 case 8: \
102 memcpy(&__gu_val, ptr, sizeof (*(ptr))); \
103 break; \ 100 break; \
104 default: \ 101 default: \
105 __gu_val = 0; \
106 __gu_err = __get_user_bad(); \ 102 __gu_err = __get_user_bad(); \
103 __gu_val = 0; \
107 break; \ 104 break; \
108 } \ 105 } \
109 (x) = (typeof(*(ptr)))__gu_val; \ 106 (x) = __gu_val; \
110 __gu_err; \ 107 __gu_err; \
111}) 108})
112#define __get_user(x, ptr) get_user(x, ptr) 109#define __get_user(x, ptr) get_user(x, ptr)