mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Cosmetic: fix endianness convertions in read[wlq]().
@ 2012-05-05 21:36 Krzysztof Halasa
  2012-05-06 17:35 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Halasa @ 2012-05-05 21:36 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-06 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-05 21:36 [PATCH] Cosmetic: fix endianness convertions in read[wlq]() Krzysztof Halasa
2012-05-06 17:35 ` Sascha Hauer
2012-05-06 20:08   ` Krzysztof Halasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox