[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1230360583-6683-1-git-send-email-vapier@gentoo.org>
Date: Sat, 27 Dec 2008 01:49:43 -0500
From: Mike Frysinger <vapier@...too.org>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] linux byteorder headers: convert to __inline__ for userspace
Use __inline__ rather than inline for all the functions exported to
userspace.
Signed-off-by: Mike Frysinger <vapier@...too.org>
---
include/linux/byteorder.h | 48 +++++++++++++++---------------
include/linux/byteorder/big_endian.h | 24 ++++++++--------
include/linux/byteorder/little_endian.h | 24 ++++++++--------
include/linux/byteorder/swabb.h | 12 ++++----
include/linux/swab.h | 30 +++++++++---------
5 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/include/linux/byteorder.h b/include/linux/byteorder.h
index 29f002d..f4ea907 100644
--- a/include/linux/byteorder.h
+++ b/include/linux/byteorder.h
@@ -85,91 +85,91 @@
#define __constant_cpu_to_be32(x) __cpu_to_be32(x)
#define __constant_cpu_to_be64(x) __cpu_to_be64(x)
-static inline void __le16_to_cpus(__u16 *p)
+static __inline__ void __le16_to_cpus(__u16 *p)
{
#ifdef __BIG_ENDIAN
__swab16s(p);
#endif
}
-static inline void __cpu_to_le16s(__u16 *p)
+static __inline__ void __cpu_to_le16s(__u16 *p)
{
#ifdef __BIG_ENDIAN
__swab16s(p);
#endif
}
-static inline void __le32_to_cpus(__u32 *p)
+static __inline__ void __le32_to_cpus(__u32 *p)
{
#ifdef __BIG_ENDIAN
__swab32s(p);
#endif
}
-static inline void __cpu_to_le32s(__u32 *p)
+static __inline__ void __cpu_to_le32s(__u32 *p)
{
#ifdef __BIG_ENDIAN
__swab32s(p);
#endif
}
-static inline void __le64_to_cpus(__u64 *p)
+static __inline__ void __le64_to_cpus(__u64 *p)
{
#ifdef __BIG_ENDIAN
__swab64s(p);
#endif
}
-static inline void __cpu_to_le64s(__u64 *p)
+static __inline__ void __cpu_to_le64s(__u64 *p)
{
#ifdef __BIG_ENDIAN
__swab64s(p);
#endif
}
-static inline void __be16_to_cpus(__u16 *p)
+static __inline__ void __be16_to_cpus(__u16 *p)
{
#ifdef __LITTLE_ENDIAN
__swab16s(p);
#endif
}
-static inline void __cpu_to_be16s(__u16 *p)
+static __inline__ void __cpu_to_be16s(__u16 *p)
{
#ifdef __LITTLE_ENDIAN
__swab16s(p);
#endif
}
-static inline void __be32_to_cpus(__u32 *p)
+static __inline__ void __be32_to_cpus(__u32 *p)
{
#ifdef __LITTLE_ENDIAN
__swab32s(p);
#endif
}
-static inline void __cpu_to_be32s(__u32 *p)
+static __inline__ void __cpu_to_be32s(__u32 *p)
{
#ifdef __LITTLE_ENDIAN
__swab32s(p);
#endif
}
-static inline void __be64_to_cpus(__u64 *p)
+static __inline__ void __be64_to_cpus(__u64 *p)
{
#ifdef __LITTLE_ENDIAN
__swab64s(p);
#endif
}
-static inline void __cpu_to_be64s(__u64 *p)
+static __inline__ void __cpu_to_be64s(__u64 *p)
{
#ifdef __LITTLE_ENDIAN
__swab64s(p);
#endif
}
-static inline __u16 __le16_to_cpup(const __le16 *p)
+static __inline__ __u16 __le16_to_cpup(const __le16 *p)
{
#ifdef __LITTLE_ENDIAN
return (__force __u16)*p;
@@ -178,7 +178,7 @@ static inline __u16 __le16_to_cpup(const __le16 *p)
#endif
}
-static inline __u32 __le32_to_cpup(const __le32 *p)
+static __inline__ __u32 __le32_to_cpup(const __le32 *p)
{
#ifdef __LITTLE_ENDIAN
return (__force __u32)*p;
@@ -187,7 +187,7 @@ static inline __u32 __le32_to_cpup(const __le32 *p)
#endif
}
-static inline __u64 __le64_to_cpup(const __le64 *p)
+static __inline__ __u64 __le64_to_cpup(const __le64 *p)
{
#ifdef __LITTLE_ENDIAN
return (__force __u64)*p;
@@ -196,7 +196,7 @@ static inline __u64 __le64_to_cpup(const __le64 *p)
#endif
}
-static inline __le16 __cpu_to_le16p(const __u16 *p)
+static __inline__ __le16 __cpu_to_le16p(const __u16 *p)
{
#ifdef __LITTLE_ENDIAN
return (__force __le16)*p;
@@ -205,7 +205,7 @@ static inline __le16 __cpu_to_le16p(const __u16 *p)
#endif
}
-static inline __le32 __cpu_to_le32p(const __u32 *p)
+static __inline__ __le32 __cpu_to_le32p(const __u32 *p)
{
#ifdef __LITTLE_ENDIAN
return (__force __le32)*p;
@@ -214,7 +214,7 @@ static inline __le32 __cpu_to_le32p(const __u32 *p)
#endif
}
-static inline __le64 __cpu_to_le64p(const __u64 *p)
+static __inline__ __le64 __cpu_to_le64p(const __u64 *p)
{
#ifdef __LITTLE_ENDIAN
return (__force __le64)*p;
@@ -223,7 +223,7 @@ static inline __le64 __cpu_to_le64p(const __u64 *p)
#endif
}
-static inline __u16 __be16_to_cpup(const __be16 *p)
+static __inline__ __u16 __be16_to_cpup(const __be16 *p)
{
#ifdef __BIG_ENDIAN
return (__force __u16)*p;
@@ -232,7 +232,7 @@ static inline __u16 __be16_to_cpup(const __be16 *p)
#endif
}
-static inline __u32 __be32_to_cpup(const __be32 *p)
+static __inline__ __u32 __be32_to_cpup(const __be32 *p)
{
#ifdef __BIG_ENDIAN
return (__force __u32)*p;
@@ -241,7 +241,7 @@ static inline __u32 __be32_to_cpup(const __be32 *p)
#endif
}
-static inline __u64 __be64_to_cpup(const __be64 *p)
+static __inline__ __u64 __be64_to_cpup(const __be64 *p)
{
#ifdef __BIG_ENDIAN
return (__force __u64)*p;
@@ -250,7 +250,7 @@ static inline __u64 __be64_to_cpup(const __be64 *p)
#endif
}
-static inline __be16 __cpu_to_be16p(const __u16 *p)
+static __inline__ __be16 __cpu_to_be16p(const __u16 *p)
{
#ifdef __BIG_ENDIAN
return (__force __be16)*p;
@@ -259,7 +259,7 @@ static inline __be16 __cpu_to_be16p(const __u16 *p)
#endif
}
-static inline __be32 __cpu_to_be32p(const __u32 *p)
+static __inline__ __be32 __cpu_to_be32p(const __u32 *p)
{
#ifdef __BIG_ENDIAN
return (__force __be32)*p;
@@ -268,7 +268,7 @@ static inline __be32 __cpu_to_be32p(const __u32 *p)
#endif
}
-static inline __be64 __cpu_to_be64p(const __u64 *p)
+static __inline__ __be64 __cpu_to_be64p(const __u64 *p)
{
#ifdef __BIG_ENDIAN
return (__force __be64)*p;
diff --git a/include/linux/byteorder/big_endian.h b/include/linux/byteorder/big_endian.h
index 1cba3f3..8dc10d2 100644
--- a/include/linux/byteorder/big_endian.h
+++ b/include/linux/byteorder/big_endian.h
@@ -41,51 +41,51 @@
#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)
+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)
+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)
+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)
+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 --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h
index cedc1b5..5162695 100644
--- a/include/linux/byteorder/little_endian.h
+++ b/include/linux/byteorder/little_endian.h
@@ -41,51 +41,51 @@
#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)
+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)
+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)
+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)
+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);
}
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h
index 8c780c7..047d3ac 100644
--- a/include/linux/byteorder/swabb.h
+++ b/include/linux/byteorder/swabb.h
@@ -89,32 +89,32 @@
__fswahb32((x)))
-static inline __u32 __fswahw32(__u32 x)
+static __inline__ __u32 __fswahw32(__u32 x)
{
return __arch__swahw32(x);
}
-static inline __u32 __swahw32p(__u32 *x)
+static __inline__ __u32 __swahw32p(__u32 *x)
{
return __arch__swahw32p(x);
}
-static inline void __swahw32s(__u32 *addr)
+static __inline__ void __swahw32s(__u32 *addr)
{
__arch__swahw32s(addr);
}
-static inline __u32 __fswahb32(__u32 x)
+static __inline__ __u32 __fswahb32(__u32 x)
{
return __arch__swahb32(x);
}
-static inline __u32 __swahb32p(__u32 *x)
+static __inline__ __u32 __swahb32p(__u32 *x)
{
return __arch__swahb32p(x);
}
-static inline void __swahb32s(__u32 *addr)
+static __inline__ void __swahb32s(__u32 *addr)
{
__arch__swahb32s(addr);
}
diff --git a/include/linux/swab.h b/include/linux/swab.h
index bbed279..9e249cd 100644
--- a/include/linux/swab.h
+++ b/include/linux/swab.h
@@ -43,7 +43,7 @@
* ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
*/
-static inline __attribute_const__ __u16 ___swab16(__u16 val)
+static __inline__ __attribute_const__ __u16 ___swab16(__u16 val)
{
#ifdef __arch_swab16
return __arch_swab16(val);
@@ -52,7 +52,7 @@ static inline __attribute_const__ __u16 ___swab16(__u16 val)
#endif
}
-static inline __attribute_const__ __u32 ___swab32(__u32 val)
+static __inline__ __attribute_const__ __u32 ___swab32(__u32 val)
{
#ifdef __arch_swab32
return __arch_swab32(val);
@@ -61,7 +61,7 @@ static inline __attribute_const__ __u32 ___swab32(__u32 val)
#endif
}
-static inline __attribute_const__ __u64 ___swab64(__u64 val)
+static __inline__ __attribute_const__ __u64 ___swab64(__u64 val)
{
#ifdef __arch_swab64
return __arch_swab64(val);
@@ -74,7 +74,7 @@ static inline __attribute_const__ __u64 ___swab64(__u64 val)
#endif
}
-static inline __attribute_const__ __u32 ___swahw32(__u32 val)
+static __inline__ __attribute_const__ __u32 ___swahw32(__u32 val)
{
#ifdef __arch_swahw32
return __arch_swahw32(val);
@@ -83,7 +83,7 @@ static inline __attribute_const__ __u32 ___swahw32(__u32 val)
#endif
}
-static inline __attribute_const__ __u32 ___swahb32(__u32 val)
+static __inline__ __attribute_const__ __u32 ___swahb32(__u32 val)
{
#ifdef __arch_swahb32
return __arch_swahb32(val);
@@ -145,7 +145,7 @@ static inline __attribute_const__ __u32 ___swahb32(__u32 val)
* __swab16p - return a byteswapped 16-bit value from a pointer
* @p: pointer to a naturally-aligned 16-bit value
*/
-static inline __u16 __swab16p(const __u16 *p)
+static __inline__ __u16 __swab16p(const __u16 *p)
{
#ifdef __arch_swab16p
return __arch_swab16p(p);
@@ -158,7 +158,7 @@ static inline __u16 __swab16p(const __u16 *p)
* __swab32p - return a byteswapped 32-bit value from a pointer
* @p: pointer to a naturally-aligned 32-bit value
*/
-static inline __u32 __swab32p(const __u32 *p)
+static __inline__ __u32 __swab32p(const __u32 *p)
{
#ifdef __arch_swab32p
return __arch_swab32p(p);
@@ -171,7 +171,7 @@ static inline __u32 __swab32p(const __u32 *p)
* __swab64p - return a byteswapped 64-bit value from a pointer
* @p: pointer to a naturally-aligned 64-bit value
*/
-static inline __u64 __swab64p(const __u64 *p)
+static __inline__ __u64 __swab64p(const __u64 *p)
{
#ifdef __arch_swab64p
return __arch_swab64p(p);
@@ -186,7 +186,7 @@ static inline __u64 __swab64p(const __u64 *p)
*
* See __swahw32() for details of wordswapping.
*/
-static inline __u32 __swahw32p(const __u32 *p)
+static __inline__ __u32 __swahw32p(const __u32 *p)
{
#ifdef __arch_swahw32p
return __arch_swahw32p(p);
@@ -201,7 +201,7 @@ static inline __u32 __swahw32p(const __u32 *p)
*
* See __swahb32() for details of high/low byteswapping.
*/
-static inline __u32 __swahb32p(const __u32 *p)
+static __inline__ __u32 __swahb32p(const __u32 *p)
{
#ifdef __arch_swahb32p
return __arch_swahb32p(p);
@@ -214,7 +214,7 @@ static inline __u32 __swahb32p(const __u32 *p)
* __swab16s - byteswap a 16-bit value in-place
* @p: pointer to a naturally-aligned 16-bit value
*/
-static inline void __swab16s(__u16 *p)
+static __inline__ void __swab16s(__u16 *p)
{
#ifdef __arch_swab16s
__arch_swab16s(p);
@@ -226,7 +226,7 @@ static inline void __swab16s(__u16 *p)
* __swab32s - byteswap a 32-bit value in-place
* @p: pointer to a naturally-aligned 32-bit value
*/
-static inline void __swab32s(__u32 *p)
+static __inline__ void __swab32s(__u32 *p)
{
#ifdef __arch_swab32s
__arch_swab32s(p);
@@ -239,7 +239,7 @@ static inline void __swab32s(__u32 *p)
* __swab64s - byteswap a 64-bit value in-place
* @p: pointer to a naturally-aligned 64-bit value
*/
-static inline void __swab64s(__u64 *p)
+static __inline__ void __swab64s(__u64 *p)
{
#ifdef __arch_swab64s
__arch_swab64s(p);
@@ -254,7 +254,7 @@ static inline void __swab64s(__u64 *p)
*
* See __swahw32() for details of wordswapping
*/
-static inline void __swahw32s(__u32 *p)
+static __inline__ void __swahw32s(__u32 *p)
{
#ifdef __arch_swahw32s
__arch_swahw32s(p);
@@ -269,7 +269,7 @@ static inline void __swahw32s(__u32 *p)
*
* See __swahb32() for details of high and low byte swapping
*/
-static inline void __swahb32s(__u32 *p)
+static __inline__ void __swahb32s(__u32 *p)
{
#ifdef __arch_swahb32s
__arch_swahb32s(p);
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists