From e0f216c0b1e5870b30821256b1352c27a82a8804 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 6 Sep 2005 15:17:51 -0700 Subject: [PATCH] --- yaml --- r: 7404 b: refs/heads/master c: eed74dfcd48101d259012ac08d29061eea500249 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-generic/unaligned.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 79a18c354161..644f7a01963d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 82a25b5670eef736a20613f8b93fe55ecb5ca4bc +refs/heads/master: eed74dfcd48101d259012ac08d29061eea500249 diff --git a/trunk/include/asm-generic/unaligned.h b/trunk/include/asm-generic/unaligned.h index 6c90f0f36eec..4dc8ddb401c1 100644 --- a/trunk/include/asm-generic/unaligned.h +++ b/trunk/include/asm-generic/unaligned.h @@ -16,9 +16,9 @@ * The main single-value unaligned transfer routines. */ #define get_unaligned(ptr) \ - ((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr)))) + __get_unaligned((ptr), sizeof(*(ptr))) #define put_unaligned(x,ptr) \ - __put_unaligned((unsigned long)(x), (ptr), sizeof(*(ptr))) + __put_unaligned((__u64)(x), (ptr), sizeof(*(ptr))) /* * This function doesn't actually exist. The idea is that when @@ -36,19 +36,19 @@ struct __una_u16 { __u16 x __attribute__((packed)); }; * Elemental unaligned loads */ -static inline unsigned long __uldq(const __u64 *addr) +static inline __u64 __uldq(const __u64 *addr) { const struct __una_u64 *ptr = (const struct __una_u64 *) addr; return ptr->x; } -static inline unsigned long __uldl(const __u32 *addr) +static inline __u32 __uldl(const __u32 *addr) { const struct __una_u32 *ptr = (const struct __una_u32 *) addr; return ptr->x; } -static inline unsigned long __uldw(const __u16 *addr) +static inline __u16 __uldw(const __u16 *addr) { const struct __una_u16 *ptr = (const struct __una_u16 *) addr; return ptr->x; @@ -78,7 +78,7 @@ static inline void __ustw(__u16 val, __u16 *addr) #define __get_unaligned(ptr, size) ({ \ const void *__gu_p = ptr; \ - unsigned long val; \ + __typeof__(*(ptr)) val; \ switch (size) { \ case 1: \ val = *(const __u8 *)__gu_p; \