Skip to contentSkip to conversation

sound/mixart: avoid redefining {readl,write}_{le,be} accessors

PATCH In review Florian Fainelli 2 participants 3 messages Nov 9, 2010 – Nov 22, 2010 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound/mixart: avoid redefining {readl,write}_{le,be} accessors

From: Florian Fainelli <[email protected]>

If the platform already provides a definition for these accessors do not redefine them. The warning was caught on MIPS.

---

sound/pci/mixart/mixart_hwdep.h +10 -0
index a46f508..812e288 100644
@@ -25,11 +25,21 @@
 
 #include <sound/hwdep.h>
 
+#ifndef readl_be
 #define readl_be(x) be32_to_cpu(__raw_readl(x))
+#endif
+
+#ifndef writel_be
 #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr)
+#endif
 
+#ifndef readl_le
 #define readl_le(x) le32_to_cpu(__raw_readl(x))
+#endif
+
+#ifndef writel_le
 #define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr)
+#endif
 
 #define MIXART_MEM(mgr,x)	((mgr)->mem[0].virt + (x))
 #define MIXART_REG(mgr,x)	((mgr)->mem[1].virt + (x))
Signature · 1 line
1.7.1
#1 lore raw
Quoted 1 line · On Tuesday 09 November 2010 18:29:08 Florian Fainelli wrote:

From: Florian Fainelli <[email protected]>

Takashi, do you have any comments on this patch?

Thanks!

Quoted 32 lines

If the platform already provides a definition for these accessors do not redefine them. The warning was caught on MIPS.

---

(quoted diff) +0 -0

b/sound/pci/mixart/mixart_hwdep.h index a46f508..812e288 100644

sound/pci/mixart/mixart_hwdep.h +10 -0
@@ -25,11 +25,21 @@
 
 #include <sound/hwdep.h>
 
+#ifndef readl_be
 #define readl_be(x) be32_to_cpu(__raw_readl(x))
+#endif
+
+#ifndef writel_be
 #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr)
+#endif
 
+#ifndef readl_le
 #define readl_le(x) le32_to_cpu(__raw_readl(x))
+#endif
+
+#ifndef writel_le
 #define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr)
+#endif
 
 #define MIXART_MEM(mgr,x)	((mgr)->mem[0].virt + (x))
 #define MIXART_REG(mgr,x)	((mgr)->mem[1].virt + (x))
#2 lore raw

At Fri, 12 Nov 2010 18:29:11 +0100,

Quoted 5 lines · Florian Fainelli
Quoted 1 line · On Tuesday 09 November 2010 18:29:08 Florian Fainelli wrote:

From: Florian Fainelli <[email protected]>

Takashi, do you have any comments on this patch?

Sorry for the late reply. Yes, I already applied it weeks ago, but the reply mail wasn't sent out but stuck in my output queue by some reason during my vacation.

Anyway, thanks for the patch. I think it's OK in the way you did for the time being. Ideally, read*_be() should be defined on all platforms, though.

Takashi

Quoted 36 lines

Thanks!

Quoted 32 lines

If the platform already provides a definition for these accessors do not redefine them. The warning was caught on MIPS.

---

(quoted diff) +0 -0

b/sound/pci/mixart/mixart_hwdep.h index a46f508..812e288 100644

sound/pci/mixart/mixart_hwdep.h +10 -0
@@ -25,11 +25,21 @@
 
 #include <sound/hwdep.h>
 
+#ifndef readl_be
 #define readl_be(x) be32_to_cpu(__raw_readl(x))
+#endif
+
+#ifndef writel_be
 #define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr)
+#endif
 
+#ifndef readl_le
 #define readl_le(x) le32_to_cpu(__raw_readl(x))
+#endif
+
+#ifndef writel_le
 #define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr)
+#endif
 
 #define MIXART_MEM(mgr,x)	((mgr)->mem[0].virt + (x))
 #define MIXART_REG(mgr,x)	((mgr)->mem[1].virt + (x))