]> git.baikalelectronics.ru Git - 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)
committerakpm <akpm@linux-foundation.org>
Sun, 3 Jul 2022 22:42:32 +0000 (15:42 -0700)
commit53a04a50097930aa98a598ba8c918d7a3fe83cfb
tree22055e041368168e5bb52395a8076ad5e3de8212
parentb5829a1f1dc45482bd7d4ccc471c340bc9994d22
sh: convert nommu io{re,un}map() to static inline functions

Recently, nommu iounmap() was converted from a static inline function to a
macro again, basically reverting commit 7900681f8d2f9b77 ("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: 6f813c7adcd824cc ("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>
arch/sh/include/asm/io.h