]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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 38019e0b48e57585b0e89f23ab929c9cad5f2edc..3f4005b5d70b2ae3055c149ccb0eb536129d11b3 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;
 }