+ sh-prevent-warnings-when-using-iounmap.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: sh: prevent warnings when using iounmap
has been added to the -mm tree.  Its filename is
     sh-prevent-warnings-when-using-iounmap.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/sh-prevent-warnings-when-using-iounmap.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/sh-prevent-warnings-when-using-iounmap.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Sam Ravnborg <sam@xxxxxxxxxxxx>
Subject: 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.

Link: http://lkml.kernel.org/r/20190622114208.24427-1-sam@xxxxxxxxxxxx
Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
Cc: Rich Felker <dalias@xxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxx>
Cc: Inki Dae <inki.dae@xxxxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/sh/include/asm/io.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/arch/sh/include/asm/io.h~sh-prevent-warnings-when-using-iounmap
+++ a/arch/sh/include/asm/io.h
@@ -369,7 +369,11 @@ static inline int iounmap_fixed(void __i
 
 #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
_

Patches currently in -mm which might be from sam@xxxxxxxxxxxx are

sh-prevent-warnings-when-using-iounmap.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux