diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-06-25 11:59:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-09 03:14:25 -0400 |
commit | 64a978c1e3b2c0e2b663caf54719319919c5c17f (patch) | |
tree | 77ba89f872e82bc4fffe35f31aed354908e95989 | |
parent | 3f168221167ca7a844fde3bf58e1c7ca0bf9741e (diff) |
x86: be more explicit in __put_user_x.
For both __put_user_x and __put_user_8 macros, pass the error
variable explicitly.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/asm-x86/uaccess_32.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h index ebfe6b23ba57..2c9067324d2c 100644 --- a/include/asm-x86/uaccess_32.h +++ b/include/asm-x86/uaccess_32.h | |||
@@ -31,11 +31,11 @@ extern void __put_user_2(void); | |||
31 | extern void __put_user_4(void); | 31 | extern void __put_user_4(void); |
32 | extern void __put_user_8(void); | 32 | extern void __put_user_8(void); |
33 | 33 | ||
34 | #define __put_user_x(size, x, ptr) \ | 34 | #define __put_user_x(size, x, ptr, __ret_pu) \ |
35 | asm volatile("call __put_user_" #size : "=a" (__ret_pu) \ | 35 | asm volatile("call __put_user_" #size : "=a" (__ret_pu) \ |
36 | :"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") | 36 | :"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") |
37 | 37 | ||
38 | #define __put_user_8(x, ptr) \ | 38 | #define __put_user_8(x, ptr, __ret_pu) \ |
39 | asm volatile("call __put_user_8" : "=a" (__ret_pu) \ | 39 | asm volatile("call __put_user_8" : "=a" (__ret_pu) \ |
40 | : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") | 40 | : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") |
41 | 41 | ||
@@ -66,19 +66,19 @@ extern void __put_user_8(void); | |||
66 | __pu_val = x; \ | 66 | __pu_val = x; \ |
67 | switch (sizeof(*(ptr))) { \ | 67 | switch (sizeof(*(ptr))) { \ |
68 | case 1: \ | 68 | case 1: \ |
69 | __put_user_x(1, __pu_val, ptr); \ | 69 | __put_user_x(1, __pu_val, ptr, __ret_pu); \ |
70 | break; \ | 70 | break; \ |
71 | case 2: \ | 71 | case 2: \ |
72 | __put_user_x(2, __pu_val, ptr); \ | 72 | __put_user_x(2, __pu_val, ptr, __ret_pu); \ |
73 | break; \ | 73 | break; \ |
74 | case 4: \ | 74 | case 4: \ |
75 | __put_user_x(4, __pu_val, ptr); \ | 75 | __put_user_x(4, __pu_val, ptr, __ret_pu); \ |
76 | break; \ | 76 | break; \ |
77 | case 8: \ | 77 | case 8: \ |
78 | __put_user_8(__pu_val, ptr); \ | 78 | __put_user_8(__pu_val, ptr, __ret_pu); \ |
79 | break; \ | 79 | break; \ |
80 | default: \ | 80 | default: \ |
81 | __put_user_x(X, __pu_val, ptr); \ | 81 | __put_user_x(X, __pu_val, ptr, __ret_pu); \ |
82 | break; \ | 82 | break; \ |
83 | } \ | 83 | } \ |
84 | __ret_pu; \ | 84 | __ret_pu; \ |