[3/7] mips: asm/io.h: Expect immutable pointer in isa_virt_to_bus prototype

Message ID 168155745691.13678.14513434425435520788.stgit@skinsburskii.localdomain
State New
Headers
Series Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes |

Commit Message

Stanislav Kinsburskii April 15, 2023, 11:17 a.m. UTC
  From: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>

These helper function - isa_virt_to_bus - doesn't need the address pointer to
be mutable.

In the same time expecting it to be mutable leads to the following build
warning for constant pointers:

  warning: passing argument 1 of ‘isa_virt_to_bus’ discards ‘const’ qualifier from pointer target type

Signed-off-by: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Michael Ellerman <mpe@ellerman.id.au>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
CC: Jiaxun Yang <jiaxun.yang@flygoat.com>
CC: linux-mips@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/mips/include/asm/io.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index cc28d207a061..d78ca2e71f8c 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -137,7 +137,7 @@  static inline void * phys_to_virt(unsigned long address)
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
  */
-static inline unsigned long isa_virt_to_bus(volatile void *address)
+static inline unsigned long isa_virt_to_bus(const volatile void *address)
 {
 	return virt_to_phys(address);
 }