提交 5c15d41b 编写于 作者: D David Howells 提交者: Linus Torvalds

[PATCH] frv: make get_user macro cast pointers

Make the get_user macro cast the source pointer to an appropriate type for the
specified size.
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 f8aec757
......@@ -180,16 +180,16 @@ do { \
\
switch (sizeof(*(ptr))) { \
case 1: \
__get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r"); \
__get_user_asm(__gu_err, *(u8*)&__gu_val, ptr, "ub", "=r"); \
break; \
case 2: \
__get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r"); \
__get_user_asm(__gu_err, *(u16*)&__gu_val, ptr, "uh", "=r"); \
break; \
case 4: \
__get_user_asm(__gu_err, __gu_val, ptr, "", "=r"); \
__get_user_asm(__gu_err, *(u32*)&__gu_val, ptr, "", "=r"); \
break; \
case 8: \
__get_user_asm(__gu_err, __gu_val, ptr, "d", "=e"); \
__get_user_asm(__gu_err, *(u64*)&__gu_val, ptr, "d", "=e"); \
break; \
default: \
__gu_err = __get_user_bad(); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册