[PATCH v3 1/3] ARM: Introduce *_relaxed() I/O accessors

Giuseppe Calderaro Giuseppe.Calderaro at arm.com
Wed Jul 14 11:15:08 EDT 2010


+#define writeb_relaxed(v,c)	((void)__raw_writeb(v,__mem_pci(c)))
+#define writew_relaxed(v,c)	((void)__raw_writew((__force u16) \
+					cpu_to_le16(v),__mem_pci(c)))
+#define writel_relaxed(v,c)	((void)__raw_writel((__force u32) \

Adding the cast here means that someone could use the __raw_writeb/w/l
macros and still get the side effect.
What about adding the same cast to the __raw_* defines as well?

Giuseppe





More information about the linux-arm-kernel mailing list