From: Krzysztof Halasa <khc@pm.waw.pl>
To: barebox@lists.infradead.org
Subject: [PATCH] Cosmetic: fix endianness convertions in read[wlq]().
Date: Sat, 05 May 2012 23:36:40 +0200 [thread overview]
Message-ID: <m3k40qmhsn.fsf@intrepid.localdomain> (raw)
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 3f0f5a2..8480acf 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -35,8 +35,8 @@
#endif
#define readb __raw_readb
-#define readw(addr) __le16_to_cpu(__raw_readw(addr))
-#define readl(addr) __le32_to_cpu(__raw_readl(addr))
+#define readw(addr) __cpu_to_le16(__raw_readw(addr))
+#define readl(addr) __cpu_to_le32(__raw_readl(addr))
#ifndef __raw_writeb
#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v))
@@ -59,7 +59,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
{
return *(const volatile u64 __force *) addr;
}
-#define readq(addr) __le64_to_cpu(__raw_readq(addr))
+#define readq(addr) __cpu_to_le64(__raw_readq(addr))
static inline void __raw_writeq(u64 b, volatile void __iomem *addr)
{
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2012-05-05 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-05 21:36 Krzysztof Halasa [this message]
2012-05-06 17:35 ` Sascha Hauer
2012-05-06 20:08 ` Krzysztof Halasa
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=m3k40qmhsn.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=barebox@lists.infradead.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