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

Stanislav Kinsburskii posted 7 patches 2 years, 8 months ago
[PATCH 4/7] hexagon: asm/io.h: Expect immutable pointer in virt_to_phys prototype
Posted by Stanislav Kinsburskii 2 years, 8 months ago
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(-)

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);
 }