public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>,
	linux-arch <linux-arch@vger.kernel.org>
Subject: [PATCH 03/37] sparc64: use get/put_endian helpers
Date: Thu, 29 May 2008 13:17:58 -0700	[thread overview]
Message-ID: <1212092278.28403.105.camel@brick> (raw)

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 arch/sparc64/kernel/unaligned.c |    8 ++++----
 arch/sparc64/lib/PeeCeeI.c      |   14 +++++++-------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index afa7fc4..0066ff0 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -535,11 +535,11 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs)
 			u64 tmp;
 
 			switch (size) {
-			case 1: data[0] = le32_to_cpup(data + 0); break;
-			default:*(u64 *)(data + 0) = le64_to_cpup((u64 *)(data + 0));
+			case 1: data[0] = get_le32(data + 0); break;
+			default:*(u64 *)(data + 0) = get_le64((__le64 *)(data + 0));
 				break;
-			case 4: tmp = le64_to_cpup((u64 *)(data + 0));
-				*(u64 *)(data + 0) = le64_to_cpup((u64 *)(data + 2));
+			case 4: tmp = get_le64((__le64 *)(data + 0));
+				*(u64 *)(data + 0) = get_le64((__le64 *)(data + 2));
 				*(u64 *)(data + 2) = tmp;
 				break;
 			}
diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c
index 8b313f1..acef744 100644
--- a/arch/sparc64/lib/PeeCeeI.c
+++ b/arch/sparc64/lib/PeeCeeI.c
@@ -21,27 +21,27 @@ void outsw(unsigned long __addr, const void *src, unsigned long count)
 	void __iomem *addr = (void __iomem *) __addr;
 
 	if (count) {
-		u16 *ps = (u16 *)src;
-		u32 *pi;
+		__le16 *ps = (__le16 *)src;
+		__le32 *pi;
 
 		if (((u64)src) & 0x2) {
-			u16 val = le16_to_cpup(ps);
+			u16 val = get_le16(ps);
 			outw(val, addr);
 			ps++;
 			count--;
 		}
-		pi = (u32 *)ps;
+		pi = (__le32 *)ps;
 		while (count >= 2) {
-			u32 w = le32_to_cpup(pi);
+			u32 w = get_le32(pi);
 
 			pi++;
 			outw(w >> 0, addr);
 			outw(w >> 16, addr);
 			count -= 2;
 		}
-		ps = (u16 *)pi;
+		ps = (__le16 *)pi;
 		if (count) {
-			u16 val = le16_to_cpup(ps);
+			u16 val = get_le16(ps);
 			outw(val, addr);
 		}
 	}
-- 
1.5.6.rc0.277.g804cf

                 reply	other threads:[~2008-05-29 20:18 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=1212092278.28403.105.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --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