提交 64a978c1 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

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: NGlauber Costa <gcosta@redhat.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3f168221
...@@ -31,11 +31,11 @@ extern void __put_user_2(void); ...@@ -31,11 +31,11 @@ extern void __put_user_2(void);
extern void __put_user_4(void); extern void __put_user_4(void);
extern void __put_user_8(void); extern void __put_user_8(void);
#define __put_user_x(size, x, ptr) \ #define __put_user_x(size, x, ptr, __ret_pu) \
asm volatile("call __put_user_" #size : "=a" (__ret_pu) \ asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
:"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") :"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
#define __put_user_8(x, ptr) \ #define __put_user_8(x, ptr, __ret_pu) \
asm volatile("call __put_user_8" : "=a" (__ret_pu) \ asm volatile("call __put_user_8" : "=a" (__ret_pu) \
: "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
...@@ -66,19 +66,19 @@ extern void __put_user_8(void); ...@@ -66,19 +66,19 @@ extern void __put_user_8(void);
__pu_val = x; \ __pu_val = x; \
switch (sizeof(*(ptr))) { \ switch (sizeof(*(ptr))) { \
case 1: \ case 1: \
__put_user_x(1, __pu_val, ptr); \ __put_user_x(1, __pu_val, ptr, __ret_pu); \
break; \ break; \
case 2: \ case 2: \
__put_user_x(2, __pu_val, ptr); \ __put_user_x(2, __pu_val, ptr, __ret_pu); \
break; \ break; \
case 4: \ case 4: \
__put_user_x(4, __pu_val, ptr); \ __put_user_x(4, __pu_val, ptr, __ret_pu); \
break; \ break; \
case 8: \ case 8: \
__put_user_8(__pu_val, ptr); \ __put_user_8(__pu_val, ptr, __ret_pu); \
break; \ break; \
default: \ default: \
__put_user_x(X, __pu_val, ptr); \ __put_user_x(X, __pu_val, ptr, __ret_pu); \
break; \ break; \
} \ } \
__ret_pu; \ __ret_pu; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册