From 80793db9091b40cf0078568bb5359be0e7f43e89 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 1 Oct 2016 14:42:33 -0600 Subject: [PATCH] sandbox: Use the address in readl/writel() functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit At present these functions do not touch addr, which can raising warnings about unused variables. This fixes the following warnings: sandbox_spl defconfig drivers/core/regmap.c: In function ‘regmap_read’: drivers/core/regmap.c:125:12: warning: unused variable ‘ptr’ [-Wunused-variable] uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE); ^ drivers/core/regmap.c: In function ‘regmap_write’: drivers/core/regmap.c:134:12: warning: unused variable ‘ptr’ [-Wunused-variable] uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE); Signed-off-by: Simon Glass Fixes: 3bfb8cb4 (dm: regmap: Implement simple regmap_read & regmap_write) --- arch/sandbox/include/asm/io.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 69196329d7..a6856356df 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -40,12 +40,12 @@ static inline void unmap_sysmem(const void *vaddr) phys_addr_t map_to_sysmem(const void *ptr); /* Define nops for sandbox I/O access */ -#define readb(addr) 0 -#define readw(addr) 0 -#define readl(addr) 0 -#define writeb(v, addr) -#define writew(v, addr) -#define writel(v, addr) +#define readb(addr) ((void)addr, 0) +#define readw(addr) ((void)addr, 0) +#define readl(addr) ((void)addr, 0) +#define writeb(v, addr) ((void)addr) +#define writew(v, addr) ((void)addr) +#define writel(v, addr) ((void)addr) /* I/O access functions */ int inl(unsigned int addr); -- 2.39.5