From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arch <linux-arch@vger.kernel.org>,
"ralf@linux-mips.org" <ralf@linux-mips.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] unaligned: write in increasing memory order
Date: Wed, 19 Nov 2008 11:20:05 -0800 [thread overview]
Message-ID: <1227122405.13182.21.camel@brick> (raw)
This ordering seems more logical.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
gcc 4.2 seems to be smart enough to figure it out in either order.
include/asm-generic/unaligned.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h
index 3bef59f..55d1126 100644
--- a/include/asm-generic/unaligned.h
+++ b/include/asm-generic/unaligned.h
@@ -164,14 +164,14 @@ static inline void __put_le16_noalign(u8 *p, u16 val)
static inline void __put_le32_noalign(u8 *p, u32 val)
{
- __put_le16_noalign(p + 2, val >> 16);
__put_le16_noalign(p, val);
+ __put_le16_noalign(p + 2, val >> 16);
}
static inline void __put_le64_noalign(u8 *p, u64 val)
{
- __put_le32_noalign(p + 4, val >> 32);
__put_le32_noalign(p, val);
+ __put_le32_noalign(p + 4, val >> 32);
}
static inline void __put_be16_noalign(u8 *p, u16 val)
--
1.6.0.4.1013.gc6a01
reply other threads:[~2008-11-19 19:20 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=1227122405.13182.21.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=ralf@linux-mips.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