Use a const pointer for map_to_sysmem()
authorSimon Glass <sjg@chromium.org>
Thu, 27 Feb 2014 20:25:55 +0000 (13:25 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 18 Mar 2014 02:05:45 +0000 (20:05 -0600)
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@chromium.org>
arch/sandbox/cpu/cpu.c

index 38019e0..3f4005b 100644 (file)
@@ -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;
 }