ARM: Make the argument to virt_to_phys() "const volatile"
PATCH 1/1 ARM: Make the argument to virt_to_phys() "const volatile"
Changing the virt_to_phys() argument to "const volatile void *" avoids compiler warnings in some situations where this function is used.
Signed-off-by Catalin Marinas <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Arnd Bergmann <[email protected]>
--- arch/arm/include/asm/memory.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/include/asm/memory.h +1 -1
@@ -188,7 +188,7 @@* translation for translating DMA addresses. Use the driver * DMA support - see dma-mapping.h. */ -static inline unsigned long virt_to_phys (void *x) +static inline unsigned long virt_to_phys (const volatile void *x) {return __virt_to_phys ((unsigned long )(x)); }
PATCH 1/1 ARM: Make the argument to virt_to_phys() "const volatile"
Quoted 4 lines · Catalin Marinas
Changing the
virt_to_phys()argument to "const volatile void *" avoids compiler warnings in some situations where this function is used.Signed-off-by Catalin Marinas <[email protected]>
Acked-by Stephen Boyd <[email protected]>
Thanks.