From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 20 Oct 2013 07:05:46 +0200 Subject: [U-Boot] [PATCH v4 01/16] sandbox: Make map_to_sysmem() use a constant pointer In-Reply-To: <1382135604-31828-2-git-send-email-sjg@chromium.org> References: <1382135604-31828-1-git-send-email-sjg@chromium.org> <1382135604-31828-2-git-send-email-sjg@chromium.org> Message-ID: <201310200705.46733.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, > 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 Acked-by: Marek Vasut I think this can be applied separately. > --- > Changes in v4: None > Changes in v3: None > Changes in v2: None > > arch/sandbox/include/asm/io.h | 2 +- > include/common.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h > index 9ac6a5f..7956041 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 409515f..8ca67f6 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; > } Best regards, Marek Vasut