[U-Boot] [PATCH v2 01/31] Use a const pointer for map_to_sysmem()

Simon Glass sjg at chromium.org
Thu Feb 27 21:25:55 CET 2014


This function does not actually change the pointer contents, so use const
so that functions which have a const pointer do not need to cast.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 arch/sandbox/cpu/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 38019e0..3f4005b 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -58,7 +58,7 @@ void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
 	return (void *)(gd->arch.ram_buf + paddr);
 }
 
-phys_addr_t map_to_sysmem(void *ptr)
+phys_addr_t map_to_sysmem(const void *ptr)
 {
 	return (u8 *)ptr - gd->arch.ram_buf;
 }
-- 
1.9.0.279.gdc9e3eb



More information about the U-Boot mailing list