mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: GOTO Masanori <gotom@debian.or.jp>
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__
Date: Mon, 20 Jun 2005 13:53:57 +0900	[thread overview]
Message-ID: <81is097hne.wl@omega.webmasters.gr.jp> (raw)

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 <gotom@debian.or.jp>

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);
 }

             reply	other threads:[~2005-06-20  4:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-20  4:53 GOTO Masanori [this message]
2005-06-24  8:21 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81is097hne.wl@omega.webmasters.gr.jp \
    --to=gotom@debian.or.jp \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®