[PATCH] hexagon: mm: fix warning in asm/io.h

From: root
Date: Fri Jun 09 2023 - 21:21:36 EST


Remove the old iounmap() declaration which is not consistent with the
standard one in asm-generic/io.h, let's use the standard one.

And also add macro definition of inb/w/l and outb/w/l to override
the definition of them in asm-generic/io.h.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Baoquan He <bhe@xxxxxxxxxx>
---
arch/hexagon/include/asm/io.h | 8 ++++++--
scripts/checksyscalls.sh | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
index dcd9cbbf5934..efe9cb00ebf8 100644
--- a/arch/hexagon/include/asm/io.h
+++ b/arch/hexagon/include/asm/io.h
@@ -27,8 +27,6 @@
extern int remap_area_pages(unsigned long start, unsigned long phys_addr,
unsigned long end, unsigned long flags);

-extern void iounmap(const volatile void __iomem *addr);
-
/* Defined in lib/io.c, needed for smc91x driver. */
extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);
extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);
@@ -207,16 +205,19 @@ static inline void memset_io(volatile void __iomem *addr, int value,
*
* Operates on "I/O bus I/O space"
*/
+#define inb inb
static inline u8 inb(unsigned long port)
{
return readb(_IO_BASE + (port & IO_SPACE_LIMIT));
}

+#define inw inw
static inline u16 inw(unsigned long port)
{
return readw(_IO_BASE + (port & IO_SPACE_LIMIT));
}

+#define inl inl
static inline u32 inl(unsigned long port)
{
return readl(_IO_BASE + (port & IO_SPACE_LIMIT));
@@ -227,16 +228,19 @@ static inline u32 inl(unsigned long port)
* @data: data to write to
* @addr: address in I/O space
*/
+#define outb outb
static inline void outb(u8 data, unsigned long port)
{
writeb(data, _IO_BASE + (port & IO_SPACE_LIMIT));
}

+#define outw outw
static inline void outw(u16 data, unsigned long port)
{
writew(data, _IO_BASE + (port & IO_SPACE_LIMIT));
}

+#define outl outl
static inline void outl(u32 data, unsigned long port)
{
writel(data, _IO_BASE + (port & IO_SPACE_LIMIT));