aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-avr32/uaccess.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-04-27 14:16:19 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-04-27 14:16:19 -0400
commitd1da4e50e5d09f02c340927a4fcb7f54202fa033 (patch)
tree7f98317bdd45dbdb7644e9179891c5af6a3a8ef1 /include/asm-avr32/uaccess.h
parent78ab67da1002d954ea4c3e2b441e2483c41f94e8 (diff)
parenta205752d1ad2d37d6597aaae5a56fc396a770868 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/mtd/Kconfig Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/asm-avr32/uaccess.h')
-rw-r--r--include/asm-avr32/uaccess.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/include/asm-avr32/uaccess.h b/include/asm-avr32/uaccess.h
index 74a679e9098c..ed092395215e 100644
--- a/include/asm-avr32/uaccess.h
+++ b/include/asm-avr32/uaccess.h
@@ -181,24 +181,23 @@ extern int __put_user_bad(void);
181 181
182#define __get_user_nocheck(x, ptr, size) \ 182#define __get_user_nocheck(x, ptr, size) \
183({ \ 183({ \
184 typeof(*(ptr)) __gu_val = (typeof(*(ptr)) __force)0; \ 184 unsigned long __gu_val = 0; \
185 int __gu_err = 0; \ 185 int __gu_err = 0; \
186 \ 186 \
187 switch (size) { \ 187 switch (size) { \
188 case 1: __get_user_asm("ub", __gu_val, ptr, __gu_err); break; \ 188 case 1: __get_user_asm("ub", __gu_val, ptr, __gu_err); break; \
189 case 2: __get_user_asm("uh", __gu_val, ptr, __gu_err); break; \ 189 case 2: __get_user_asm("uh", __gu_val, ptr, __gu_err); break; \
190 case 4: __get_user_asm("w", __gu_val, ptr, __gu_err); break; \ 190 case 4: __get_user_asm("w", __gu_val, ptr, __gu_err); break; \
191 case 8: __get_user_asm("d", __gu_val, ptr, __gu_err); break; \
192 default: __gu_err = __get_user_bad(); break; \ 191 default: __gu_err = __get_user_bad(); break; \
193 } \ 192 } \
194 \ 193 \
195 x = __gu_val; \ 194 x = (typeof(*(ptr)))__gu_val; \
196 __gu_err; \ 195 __gu_err; \
197}) 196})
198 197
199#define __get_user_check(x, ptr, size) \ 198#define __get_user_check(x, ptr, size) \
200({ \ 199({ \
201 typeof(*(ptr)) __gu_val = (typeof(*(ptr)) __force)0; \ 200 unsigned long __gu_val = 0; \
202 const typeof(*(ptr)) __user * __gu_addr = (ptr); \ 201 const typeof(*(ptr)) __user * __gu_addr = (ptr); \
203 int __gu_err = 0; \ 202 int __gu_err = 0; \
204 \ 203 \
@@ -216,10 +215,6 @@ extern int __put_user_bad(void);
216 __get_user_asm("w", __gu_val, __gu_addr, \ 215 __get_user_asm("w", __gu_val, __gu_addr, \
217 __gu_err); \ 216 __gu_err); \
218 break; \ 217 break; \
219 case 8: \
220 __get_user_asm("d", __gu_val, __gu_addr, \
221 __gu_err); \
222 break; \
223 default: \ 218 default: \
224 __gu_err = __get_user_bad(); \ 219 __gu_err = __get_user_bad(); \
225 break; \ 220 break; \
@@ -227,7 +222,7 @@ extern int __put_user_bad(void);
227 } else { \ 222 } else { \
228 __gu_err = -EFAULT; \ 223 __gu_err = -EFAULT; \
229 } \ 224 } \
230 x = __gu_val; \ 225 x = (typeof(*(ptr)))__gu_val; \
231 __gu_err; \ 226 __gu_err; \
232}) 227})
233 228