diff options
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r-- | include/asm-m68knommu/uaccess.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h index 05be9515a2d2..62b29b10bc6d 100644 --- a/include/asm-m68knommu/uaccess.h +++ b/include/asm-m68knommu/uaccess.h | |||
@@ -93,7 +93,7 @@ extern int __put_user_bad(void); | |||
93 | #define get_user(x, ptr) \ | 93 | #define get_user(x, ptr) \ |
94 | ({ \ | 94 | ({ \ |
95 | int __gu_err = 0; \ | 95 | int __gu_err = 0; \ |
96 | typeof(*(ptr)) __gu_val = 0; \ | 96 | typeof(x) __gu_val = 0; \ |
97 | switch (sizeof(*(ptr))) { \ | 97 | switch (sizeof(*(ptr))) { \ |
98 | case 1: \ | 98 | case 1: \ |
99 | __get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \ | 99 | __get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \ |
@@ -105,23 +105,23 @@ extern int __put_user_bad(void); | |||
105 | __get_user_asm(__gu_err, __gu_val, ptr, l, "=r"); \ | 105 | __get_user_asm(__gu_err, __gu_val, ptr, l, "=r"); \ |
106 | break; \ | 106 | break; \ |
107 | case 8: \ | 107 | case 8: \ |
108 | memcpy(&__gu_val, ptr, sizeof (*(ptr))); \ | 108 | memcpy((void *) &__gu_val, ptr, sizeof (*(ptr))); \ |
109 | break; \ | 109 | break; \ |
110 | default: \ | 110 | default: \ |
111 | __gu_val = 0; \ | 111 | __gu_val = 0; \ |
112 | __gu_err = __get_user_bad(); \ | 112 | __gu_err = __get_user_bad(); \ |
113 | break; \ | 113 | break; \ |
114 | } \ | 114 | } \ |
115 | (x) = __gu_val; \ | 115 | (x) = (typeof(*(ptr))) __gu_val; \ |
116 | __gu_err; \ | 116 | __gu_err; \ |
117 | }) | 117 | }) |
118 | #define __get_user(x, ptr) get_user(x, ptr) | 118 | #define __get_user(x, ptr) get_user(x, ptr) |
119 | 119 | ||
120 | extern int __get_user_bad(void); | 120 | extern int __get_user_bad(void); |
121 | 121 | ||
122 | #define __get_user_asm(err,x,ptr,bwl,reg) \ | 122 | #define __get_user_asm(err,x,ptr,bwl,reg) \ |
123 | __asm__ ("move" #bwl " %1,%0" \ | 123 | __asm__ ("move" #bwl " %1,%0" \ |
124 | : "=d" (x) \ | 124 | : "=d" (x) \ |
125 | : "m" (*__ptr(ptr))) | 125 | : "m" (*__ptr(ptr))) |
126 | 126 | ||
127 | #define copy_from_user(to, from, n) (memcpy(to, from, n), 0) | 127 | #define copy_from_user(to, from, n) (memcpy(to, from, n), 0) |