From: Simon Glass Date: Sat, 1 Oct 2016 20:42:33 +0000 (-0600) Subject: sandbox: Use the address in readl/writel() functions X-Git-Tag: v2016.11-rc2~10^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80793db9091b40cf0078568bb5359be0e7f43e89;p=oweals%2Fu-boot.git sandbox: Use the address in readl/writel() functions 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) --- 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);