[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190622114208.24427-1-sam@ravnborg.org>
Date: Sat, 22 Jun 2019 13:42:08 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: linux-kernel@...r.kernel.org, linux-sh@...r.kernel.org
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
Will Deacon <will.deacon@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mark Brown <broonie@...nel.org>,
Inki Dae <inki.dae@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Sam Ravnborg <sam@...nborg.org>
Subject: [PATCH] sh: prevent warnings when using iounmap
When building drm/exynos for sh, as part of an allmodconfig build,
the following warning triggered:
exynos7_drm_decon.c: In function ‘decon_remove’:
exynos7_drm_decon.c:769:24: warning: unused variable ‘ctx’
struct decon_context *ctx = dev_get_drvdata(&pdev->dev);
The ctx variable is only used as argument to iounmap().
In sh - allmodconfig CONFIG_MMU is not defined
so it ended up in:
\#define __iounmap(addr) do { } while (0)
\#define iounmap __iounmap
Fix the warning by introducing a static inline
function for iounmap.
This is similar to several other architectures.
Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc: Rich Felker <dalias@...c.org>
Cc: Will Deacon <will.deacon@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mark Brown <broonie@...nel.org>
Cc: Inki Dae <inki.dae@...sung.com>
Cc: Krzysztof Kozlowski <krzk@...nel.org>
Cc: linux-sh@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
arch/sh/include/asm/io.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index c28e37a344ad..ac0561960c52 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -369,7 +369,11 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
#define ioremap_nocache ioremap
#define ioremap_uc ioremap
-#define iounmap __iounmap
+
+static inline void iounmap(void __iomem *addr)
+{
+ __iounmap(addr);
+}
/*
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
--
2.20.1
Powered by blists - more mailing lists