mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/2] arm: virt_to_phys should take a volatile ptr
@ 2015-02-24 21:00 Lucas Stach
  2015-02-24 21:00 ` [PATCH v2 2/2] net: rtl8169: silence compiler warning Lucas Stach
  2015-02-25  7:37 ` [PATCH v2 1/2] arm: virt_to_phys should take a volatile ptr Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2015-02-24 21:00 UTC (permalink / raw)
  To: barebox

So users can pass in device memory pointers without provoking
warnings.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/cpu/mmu.c         | 2 +-
 arch/arm/include/asm/mmu.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index e733ec4..aaf66d4 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -393,7 +393,7 @@ void *dma_alloc_coherent(size_t size)
 	return ret;
 }
 
-unsigned long virt_to_phys(void *virt)
+unsigned long virt_to_phys(volatile void *virt)
 {
 	return (unsigned long)virt;
 }
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 4234979..c6e425f 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -39,7 +39,7 @@ void dma_free_coherent(void *mem, size_t size);
 void dma_clean_range(unsigned long, unsigned long);
 void dma_flush_range(unsigned long, unsigned long);
 void dma_inv_range(unsigned long, unsigned long);
-unsigned long virt_to_phys(void *virt);
+unsigned long virt_to_phys(volatile void *virt);
 void *phys_to_virt(unsigned long phys);
 void remap_range(void *_start, size_t size, uint32_t flags);
 void *map_io_sections(unsigned long physaddr, void *start, size_t size);
@@ -62,7 +62,7 @@ static inline void *phys_to_virt(unsigned long phys)
 	return (void *)phys;
 }
 
-static inline unsigned long virt_to_phys(void *mem)
+static inline unsigned long virt_to_phys(volatile void *mem)
 {
 	return (unsigned long)mem;
 }
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-25  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-24 21:00 [PATCH v2 1/2] arm: virt_to_phys should take a volatile ptr Lucas Stach
2015-02-24 21:00 ` [PATCH v2 2/2] net: rtl8169: silence compiler warning Lucas Stach
2015-02-25  7:37 ` [PATCH v2 1/2] arm: virt_to_phys should take a volatile ptr Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox