Messages in this thread Patch in this message | | | Date | Fri, 6 Jan 2006 16:29:37 GMT | From | David Howells <> | Subject | [PATCH 11/17] FRV: Make get_user macro cast pointers |
| |
The attached patch makes the get_user macro cast the source pointer to an appropriate type for the specified size.
Signed-Off-By: David Howells <dhowells@redhat.com> --- warthog>diffstat -p1 frv-uaccess-2615.diff include/asm-frv/uaccess.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff -uNrp /warthog/kernels/linux-2.6.15/include/asm-frv/uaccess.h linux-2.6.15-frv/include/asm-frv/uaccess.h --- /warthog/kernels/linux-2.6.15/include/asm-frv/uaccess.h 2005-11-01 13:19:17.000000000 +0000 +++ linux-2.6.15-frv/include/asm-frv/uaccess.h 2006-01-06 14:43:43.000000000 +0000 @@ -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(); \ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |