[4/7] hexagon: asm/io.h: Expect immutable pointer in virt_to_phys prototype

Message ID 168155746272.13678.16103862954212080276.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 - virt_to_phys - 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 ‘virt_to_phys’ discards ‘const’ qualifier from pointer target type

Signed-off-by: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
CC: Brian Cain <bcain@quicinc.com>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Mark Brown <broonie@kernel.org>
CC: linux-hexagon@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/hexagon/include/asm/io.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
index 46a099de85b7..facbd7467dd3 100644
--- a/arch/hexagon/include/asm/io.h
+++ b/arch/hexagon/include/asm/io.h
@@ -46,7 +46,7 @@  extern void __raw_writesl(void __iomem *addr, const void *data, int wordlen);
  * virt_to_phys - map virtual address to physical
  * @address:  address to map
  */
-static inline unsigned long virt_to_phys(volatile void *address)
+static inline unsigned long virt_to_phys(const volatile void *address)
 {
 	return __pa(address);
 }