* [PATCH] sound/mixart: avoid redefining {readl,write}_{le,be} accessors
@ 2010-11-09 17:29 Florian Fainelli
2010-11-12 17:29 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2010-11-09 17:29 UTC (permalink / raw)
To: alsa-devel; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai
From: Florian Fainelli <florian@openwrt.org>
If the platform already provides a definition for these accessors
do not redefine them. The warning was caught on MIPS.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/sound/pci/mixart/mixart_hwdep.h b/sound/pci/mixart/mixart_hwdep.h
index a46f508..812e288 100644
--- a/sound/pci/mixart/mixart_hwdep.h
+++ b/sound/pci/mixart/mixart_hwdep.h
@@ -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))
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sound/mixart: avoid redefining {readl,write}_{le,be} accessors
2010-11-09 17:29 [PATCH] sound/mixart: avoid redefining {readl,write}_{le,be} accessors Florian Fainelli
@ 2010-11-12 17:29 ` Florian Fainelli
2010-11-22 7:02 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2010-11-12 17:29 UTC (permalink / raw)
To: alsa-devel; +Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai
On Tuesday 09 November 2010 18:29:08 Florian Fainelli wrote:
> From: Florian Fainelli <florian@openwrt.org>
Takashi, do you have any comments on this patch?
Thanks!
>
> If the platform already provides a definition for these accessors
> do not redefine them. The warning was caught on MIPS.
>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/sound/pci/mixart/mixart_hwdep.h
> b/sound/pci/mixart/mixart_hwdep.h index a46f508..812e288 100644
> --- a/sound/pci/mixart/mixart_hwdep.h
> +++ b/sound/pci/mixart/mixart_hwdep.h
> @@ -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))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sound/mixart: avoid redefining {readl,write}_{le,be} accessors
2010-11-12 17:29 ` Florian Fainelli
@ 2010-11-22 7:02 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2010-11-22 7:02 UTC (permalink / raw)
To: Florian Fainelli; +Cc: alsa-devel, linux-kernel, Jaroslav Kysela
At Fri, 12 Nov 2010 18:29:11 +0100,
Florian Fainelli wrote:
>
> On Tuesday 09 November 2010 18:29:08 Florian Fainelli wrote:
> > From: Florian Fainelli <florian@openwrt.org>
>
> 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
>
> Thanks!
>
> >
> > If the platform already provides a definition for these accessors
> > do not redefine them. The warning was caught on MIPS.
> >
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > ---
> > diff --git a/sound/pci/mixart/mixart_hwdep.h
> > b/sound/pci/mixart/mixart_hwdep.h index a46f508..812e288 100644
> > --- a/sound/pci/mixart/mixart_hwdep.h
> > +++ b/sound/pci/mixart/mixart_hwdep.h
> > @@ -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))
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-22 7:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 17:29 [PATCH] sound/mixart: avoid redefining {readl,write}_{le,be} accessors Florian Fainelli
2010-11-12 17:29 ` Florian Fainelli
2010-11-22 7:02 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox