diff mbox series

[1/2] hexagon: define ioremap_uc

Message ID 20191209222956.239798-2-ndesaulniers@google.com
State Accepted
Commit 7312b70699252074d753c5005fc67266c547bbe3
Headers show
Series Hexagon fixes | expand

Commit Message

Nick Desaulniers Dec. 9, 2019, 10:29 p.m. UTC
Similar to
commit 38e45d81d14e ("sparc64: implement ioremap_uc")
define ioremap_uc for hexagon to avoid errors from
-Wimplicit-function-definition.

Fixes: e537654b7039 ("lib: devres: add a helper function for ioremap_uc")
Link: https://github.com/ClangBuiltLinux/linux/issues/797
Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

---
 arch/hexagon/include/asm/io.h | 1 +
 1 file changed, 1 insertion(+)

-- 
2.24.0.393.g34dc348eaf-goog

Comments

Brian Cain Dec. 10, 2019, 1:05 a.m. UTC | #1
> -----Original Message-----

> From: linux-hexagon-owner@vger.kernel.org <linux-hexagon-

> owner@vger.kernel.org> On Behalf Of Nick Desaulniers

> Sent: Monday, December 9, 2019 4:30 PM

> To: bcain@codeaurora.org

> Cc: Nick Desaulniers <ndesaulniers@google.com>; lee.jones@linaro.org;

> andriy.shevchenko@linux.intel.com; ztuowen@gmail.com;

> mika.westerberg@linux.intel.com; mcgrof@kernel.org;

> gregkh@linuxfoundation.org; alexios.zavras@intel.com;

> allison@lohutok.net; will@kernel.org; rfontana@redhat.com;

> tglx@linutronix.de; peterz@infradead.org; boqun.feng@gmail.com;

> mingo@redhat.com; akpm@linux-foundation.org; geert@linux-m68k.org;

> linux-hexagon@vger.kernel.org; clang-built-linux@googlegroups.com; linux-

> kernel@vger.kernel.org; Nathan Chancellor <natechancellor@gmail.com>

> Subject: [PATCH 1/2] hexagon: define ioremap_uc

> 

> Similar to

> commit 38e45d81d14e ("sparc64: implement ioremap_uc") define

> ioremap_uc for hexagon to avoid errors from -Wimplicit-function-definition.

> 

> Fixes: e537654b7039 ("lib: devres: add a helper function for ioremap_uc")

> Link: https://github.com/ClangBuiltLinux/linux/issues/797

> Suggested-by: Nathan Chancellor <natechancellor@gmail.com>

> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

> ---

>  arch/hexagon/include/asm/io.h | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/arch/hexagon/include/asm/io.h

> b/arch/hexagon/include/asm/io.h index 539e3efcf39c..b0dbc3473172

> 100644

> --- a/arch/hexagon/include/asm/io.h

> +++ b/arch/hexagon/include/asm/io.h

> @@ -173,6 +173,7 @@ static inline void writel(u32 data, volatile void

> __iomem *addr)

> 

>  void __iomem *ioremap(unsigned long phys_addr, unsigned long size);

> #define ioremap_nocache ioremap

> +#define ioremap_uc(X, Y) ioremap((X), (Y))

> 

> 

>  #define __raw_writel writel

> --

> 2.24.0.393.g34dc348eaf-goog


Acked-by: Brian Cain <bcain@codeaurora.org>
Geert Uytterhoeven Dec. 10, 2019, 8:09 a.m. UTC | #2
On Mon, Dec 9, 2019 at 11:30 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
> Similar to

> commit 38e45d81d14e ("sparc64: implement ioremap_uc")

> define ioremap_uc for hexagon to avoid errors from

> -Wimplicit-function-definition.

>

> Fixes: e537654b7039 ("lib: devres: add a helper function for ioremap_uc")

> Link: https://github.com/ClangBuiltLinux/linux/issues/797

> Suggested-by: Nathan Chancellor <natechancellor@gmail.com>

> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

> ---

>  arch/hexagon/include/asm/io.h | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h

> index 539e3efcf39c..b0dbc3473172 100644

> --- a/arch/hexagon/include/asm/io.h

> +++ b/arch/hexagon/include/asm/io.h

> @@ -173,6 +173,7 @@ static inline void writel(u32 data, volatile void __iomem *addr)

>

>  void __iomem *ioremap(unsigned long phys_addr, unsigned long size);

>  #define ioremap_nocache ioremap

> +#define ioremap_uc(X, Y) ioremap((X), (Y))


Do we really need this? There is only one user of ioremap_uc(), which
Christoph is trying hard to get rid of, and the new devres helper that
triggers all of this :-(
https://lore.kernel.org/dri-devel/20191112105507.GA7122@lst.de/

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
diff mbox series

Patch

diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
index 539e3efcf39c..b0dbc3473172 100644
--- a/arch/hexagon/include/asm/io.h
+++ b/arch/hexagon/include/asm/io.h
@@ -173,6 +173,7 @@  static inline void writel(u32 data, volatile void __iomem *addr)
 
 void __iomem *ioremap(unsigned long phys_addr, unsigned long size);
 #define ioremap_nocache ioremap
+#define ioremap_uc(X, Y) ioremap((X), (Y))
 
 
 #define __raw_writel writel