From: Simon Glass Date: Thu, 7 Nov 2013 16:31:58 +0000 (-0700) Subject: sandbox: Make map_to_sysmem() use a constant pointer X-Git-Tag: v2014.01-rc1~1^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ed072b96efd7a5de51cef01c3d4bed4db0e391f0;p=u-boot sandbox: Make map_to_sysmem() use a constant pointer Very often a constant pointer is passed to this function, so we should declare this, since map_to_sysmem() does not change the pointer. Signed-off-by: Simon Glass --- diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 9ac6a5f00d..7956041171 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -38,6 +38,6 @@ static inline void unmap_sysmem(const void *vaddr) } /* Map from a pointer to our RAM buffer */ -phys_addr_t map_to_sysmem(void *ptr); +phys_addr_t map_to_sysmem(const void *ptr); #endif diff --git a/include/common.h b/include/common.h index 409515f498..8ca67f64fa 100644 --- a/include/common.h +++ b/include/common.h @@ -923,7 +923,7 @@ static inline void unmap_sysmem(const void *vaddr) { } -static inline phys_addr_t map_to_sysmem(void *ptr) +static inline phys_addr_t map_to_sysmem(const void *ptr) { return (phys_addr_t)(uintptr_t)ptr; }