Skip to content

Commit b28d1cc

Browse files
Stanislav Kinsburskiimpe
authored andcommitted
powerpc/io: Expect immutable pointer in virt_to_phys() prototype
virt_to_phys() doesn't need the address pointer to be mutable. At the same time allowing 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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/168155747391.13678.10634415747614468991.stgit@skinsburskii.localdomain
1 parent 6db51ff commit b28d1cc

File tree

1 file changed

+1
-1
lines changed
  • arch/powerpc/include/asm

1 file changed

+1
-1
lines changed

arch/powerpc/include/asm/io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ extern void __iomem *__ioremap_caller(phys_addr_t, unsigned long size,
950950
* almost all conceivable cases a device driver should not be using
951951
* this function
952952
*/
953-
static inline unsigned long virt_to_phys(volatile void * address)
953+
static inline unsigned long virt_to_phys(const volatile void * address)
954954
{
955955
WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && !virt_addr_valid(address));
956956

0 commit comments

Comments
 (0)