]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
sh: convert nommu io{re,un}map() to static inline functions
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 20 Jun 2022 07:01:43 +0000 (09:01 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:52:36 +0000 (10:52 +0200)
commit554d201971550e37cbf6cc673ea336530869c687
tree91e21840818e33e90367399a6e3a6976902c9dab
parent7b4787e5dedf14ba7be419bda81e98398a400990
sh: convert nommu io{re,un}map() to static inline functions

BugLink: https://bugs.launchpad.net/bugs/1988351
commit d684e0a52d36f8939eda30a0f31ee235ee4ee741 upstream.

Recently, nommu iounmap() was converted from a static inline function to a
macro again, basically reverting commit 4580ba4ad2e6b8dd ("sh: Convert
iounmap() macros to inline functions").  With -Werror, this leads to build
failures like:

    drivers/iio/adc/xilinx-ams.c: In function `ams_iounmap_ps':
    drivers/iio/adc/xilinx-ams.c:1195:14: error: unused variable `ams' [-Werror=unused-variable]
     1195 |  struct ams *ams = data;
  |              ^~~

Fix this by replacing the macros for ioremap() and iounmap() by static
inline functions, based on <asm-generic/io.h>.

Link: https://lkml.kernel.org/r/8d1b1766260961799b04035e7bc39a7f59729f72.1655708312.git.geert+renesas@glider.be
Fixes: 13f1fc870dd74713 ("sh: move the ioremap implementation out of line")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/sh/include/asm/io.h