From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arch <linux-arch@vger.kernel.org>
Subject: [PATCH 37/37] unaligned-access: use get/put_endian helpers
Date: Thu, 29 May 2008 13:19:17 -0700 [thread overview]
Message-ID: <1212092357.28403.139.camel@brick> (raw)
Arches that have no unaligned access restictions can call the
aligned versions.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
include/linux/unaligned/access_ok.h | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/linux/unaligned/access_ok.h b/include/linux/unaligned/access_ok.h
index 99c1b4d..341074d 100644
--- a/include/linux/unaligned/access_ok.h
+++ b/include/linux/unaligned/access_ok.h
@@ -6,62 +6,62 @@
static inline u16 get_unaligned_le16(const void *p)
{
- return le16_to_cpup((__le16 *)p);
+ return get_le16((__le16 *)p);
}
static inline u32 get_unaligned_le32(const void *p)
{
- return le32_to_cpup((__le32 *)p);
+ return get_le32((__le32 *)p);
}
static inline u64 get_unaligned_le64(const void *p)
{
- return le64_to_cpup((__le64 *)p);
+ return get_le64((__le64 *)p);
}
static inline u16 get_unaligned_be16(const void *p)
{
- return be16_to_cpup((__be16 *)p);
+ return get_be16((__be16 *)p);
}
static inline u32 get_unaligned_be32(const void *p)
{
- return be32_to_cpup((__be32 *)p);
+ return get_be32((__be32 *)p);
}
static inline u64 get_unaligned_be64(const void *p)
{
- return be64_to_cpup((__be64 *)p);
+ return get_be64((__be64 *)p);
}
static inline void put_unaligned_le16(u16 val, void *p)
{
- *((__le16 *)p) = cpu_to_le16(val);
+ put_le16(val, (__le16 *)p);
}
static inline void put_unaligned_le32(u32 val, void *p)
{
- *((__le32 *)p) = cpu_to_le32(val);
+ put_le32(val, (__le32 *)p);
}
static inline void put_unaligned_le64(u64 val, void *p)
{
- *((__le64 *)p) = cpu_to_le64(val);
+ put_le64(val, (__le64 *)p);
}
static inline void put_unaligned_be16(u16 val, void *p)
{
- *((__be16 *)p) = cpu_to_be16(val);
+ put_be16(val, (__be16 *)p);
}
static inline void put_unaligned_be32(u32 val, void *p)
{
- *((__be32 *)p) = cpu_to_be32(val);
+ put_be32(val, (__be32 *)p);
}
static inline void put_unaligned_be64(u64 val, void *p)
{
- *((__be64 *)p) = cpu_to_be64(val);
+ put_be64(val, (__be64 *)p);
}
#endif /* _LINUX_UNALIGNED_ACCESS_OK_H */
--
1.5.6.rc0.277.g804cf
reply other threads:[~2008-05-29 20:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1212092357.28403.139.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.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