From: Simon Glass Date: Thu, 27 Feb 2014 20:25:55 +0000 (-0700) Subject: Use a const pointer for map_to_sysmem() X-Git-Tag: v2014.04-rc3~56 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66bd1cff901c5b19b351c7b5ad48cee09c15d992;p=u-boot Use a const pointer for map_to_sysmem() 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 --- diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index 38019e0b48..3f4005b5d7 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; }