lkml.org 
[lkml]   [2023]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 5/7] ia64: asm/io.h: Expect immutable pointer in virt_to_phys prototype
From
Date
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: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Helge Deller <deller@gmx.de>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Bjorn Helgaas <bhelgaas@google.com>
CC: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
CC: linux-ia64@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
arch/ia64/include/asm/io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
index 83a492c8d298..c56ad21ba1e9 100644
--- a/arch/ia64/include/asm/io.h
+++ b/arch/ia64/include/asm/io.h
@@ -74,7 +74,7 @@ extern unsigned int num_io_spaces;
* Change virtual addresses to physical addresses and vv.
*/
static inline unsigned long
-virt_to_phys (volatile void *address)
+virt_to_phys (const volatile void *address)
{
return (unsigned long) address - PAGE_OFFSET;
}

\
 
 \ /
  Last update: 2023-04-27 19:43    [W:0.064 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site