From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261436AbVFTE53 (ORCPT ); Mon, 20 Jun 2005 00:57:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261450AbVFTE53 (ORCPT ); Mon, 20 Jun 2005 00:57:29 -0400 Received: from omega.webmasters.gr.jp ([218.44.239.78]:13214 "EHLO webmasters.gr.jp") by vger.kernel.org with ESMTP id S261436AbVFTEx6 (ORCPT ); Mon, 20 Jun 2005 00:53:58 -0400 Date: Mon, 20 Jun 2005 13:53:57 +0900 Message-ID: <81is097hne.wl@omega.webmasters.gr.jp> From: GOTO Masanori To: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org Cc: gotom@debian.or.jp Subject: [PATCH] headers 4/4: Clean up byteorder/{little,big}_endian.h to use __inline__ User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This patch cleans up 2.6.12 byteorder/{little,big}_endian.h to use __inline__ instead of inline because they're included by asm/byteorder.h which also uses __inline__. In addition, it uses __BYTEORDER_HAS_U64__ that is similar to include/linux/byteorder/swab.h. Signed-off-by: GOTO Masanori Regards, -- gotom big_endian.h | 28 ++++++++++++++++------------ little_endian.h | 28 ++++++++++++++++------------ 2 files changed, 32 insertions(+), 24 deletions(-) diff -Nuarp linux-2.6.12/include/linux/byteorder/big_endian.h linux-2.6.12.gotom/include/linux/byteorder/big_endian.h --- linux-2.6.12/include/linux/byteorder/big_endian.h 2005-06-18 04:48:29.000000000 +0900 +++ linux-2.6.12.gotom/include/linux/byteorder/big_endian.h 2005-06-20 13:11:59.068541152 +0900 @@ -40,51 +40,55 @@ #define __cpu_to_be16(x) ((__force __be16)(__u16)(x)) #define __be16_to_cpu(x) ((__force __u16)(__be16)(x)) -static inline __le64 __cpu_to_le64p(const __u64 *p) +#ifdef __BYTEORDER_HAS_U64__ +static __inline__ __le64 __cpu_to_le64p(const __u64 *p) { return (__force __le64)__swab64p(p); } -static inline __u64 __le64_to_cpup(const __le64 *p) +static __inline__ __u64 __le64_to_cpup(const __le64 *p) { return __swab64p((__u64 *)p); } -static inline __le32 __cpu_to_le32p(const __u32 *p) +#endif +static __inline__ __le32 __cpu_to_le32p(const __u32 *p) { return (__force __le32)__swab32p(p); } -static inline __u32 __le32_to_cpup(const __le32 *p) +static __inline__ __u32 __le32_to_cpup(const __le32 *p) { return __swab32p((__u32 *)p); } -static inline __le16 __cpu_to_le16p(const __u16 *p) +static __inline__ __le16 __cpu_to_le16p(const __u16 *p) { return (__force __le16)__swab16p(p); } -static inline __u16 __le16_to_cpup(const __le16 *p) +static __inline__ __u16 __le16_to_cpup(const __le16 *p) { return __swab16p((__u16 *)p); } -static inline __be64 __cpu_to_be64p(const __u64 *p) +#ifdef __BYTEORDER_HAS_U64__ +static __inline__ __be64 __cpu_to_be64p(const __u64 *p) { return (__force __be64)*p; } -static inline __u64 __be64_to_cpup(const __be64 *p) +static __inline__ __u64 __be64_to_cpup(const __be64 *p) { return (__force __u64)*p; } -static inline __be32 __cpu_to_be32p(const __u32 *p) +#endif +static __inline__ __be32 __cpu_to_be32p(const __u32 *p) { return (__force __be32)*p; } -static inline __u32 __be32_to_cpup(const __be32 *p) +static __inline__ __u32 __be32_to_cpup(const __be32 *p) { return (__force __u32)*p; } -static inline __be16 __cpu_to_be16p(const __u16 *p) +static __inline__ __be16 __cpu_to_be16p(const __u16 *p) { return (__force __be16)*p; } -static inline __u16 __be16_to_cpup(const __be16 *p) +static __inline__ __u16 __be16_to_cpup(const __be16 *p) { return (__force __u16)*p; } diff -Nuarp linux-2.6.12/include/linux/byteorder/little_endian.h linux-2.6.12.gotom/include/linux/byteorder/little_endian.h --- linux-2.6.12/include/linux/byteorder/little_endian.h 2005-06-18 04:48:29.000000000 +0900 +++ linux-2.6.12.gotom/include/linux/byteorder/little_endian.h 2005-06-20 13:11:59.066541420 +0900 @@ -40,51 +40,55 @@ #define __cpu_to_be16(x) ((__force __be16)__swab16((x))) #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) -static inline __le64 __cpu_to_le64p(const __u64 *p) +#ifdef __BYTEORDER_HAS_U64__ +static __inline__ __le64 __cpu_to_le64p(const __u64 *p) { return (__force __le64)*p; } -static inline __u64 __le64_to_cpup(const __le64 *p) +static __inline__ __u64 __le64_to_cpup(const __le64 *p) { return (__force __u64)*p; } -static inline __le32 __cpu_to_le32p(const __u32 *p) +#endif +static __inline__ __le32 __cpu_to_le32p(const __u32 *p) { return (__force __le32)*p; } -static inline __u32 __le32_to_cpup(const __le32 *p) +static __inline__ __u32 __le32_to_cpup(const __le32 *p) { return (__force __u32)*p; } -static inline __le16 __cpu_to_le16p(const __u16 *p) +static __inline__ __le16 __cpu_to_le16p(const __u16 *p) { return (__force __le16)*p; } -static inline __u16 __le16_to_cpup(const __le16 *p) +static __inline__ __u16 __le16_to_cpup(const __le16 *p) { return (__force __u16)*p; } -static inline __be64 __cpu_to_be64p(const __u64 *p) +#ifdef __BYTEORDER_HAS_U64__ +static __inline__ __be64 __cpu_to_be64p(const __u64 *p) { return (__force __be64)__swab64p(p); } -static inline __u64 __be64_to_cpup(const __be64 *p) +static __inline__ __u64 __be64_to_cpup(const __be64 *p) { return __swab64p((__u64 *)p); } -static inline __be32 __cpu_to_be32p(const __u32 *p) +#endif +static __inline__ __be32 __cpu_to_be32p(const __u32 *p) { return (__force __be32)__swab32p(p); } -static inline __u32 __be32_to_cpup(const __be32 *p) +static __inline__ __u32 __be32_to_cpup(const __be32 *p) { return __swab32p((__u32 *)p); } -static inline __be16 __cpu_to_be16p(const __u16 *p) +static __inline__ __be16 __cpu_to_be16p(const __u16 *p) { return (__force __be16)__swab16p(p); } -static inline __u16 __be16_to_cpup(const __be16 *p) +static __inline__ __u16 __be16_to_cpup(const __be16 *p) { return __swab16p((__u16 *)p); }