Skip to content
Snippets Groups Projects
Commit ed072b96 authored by Simon Glass's avatar Simon Glass
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 370b6c5c
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,6 @@ static inline void unmap_sysmem(const void *vaddr) ...@@ -38,6 +38,6 @@ static inline void unmap_sysmem(const void *vaddr)
} }
/* Map from a pointer to our RAM buffer */ /* 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 #endif
...@@ -923,7 +923,7 @@ static inline void unmap_sysmem(const void *vaddr) ...@@ -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; return (phys_addr_t)(uintptr_t)ptr;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment