diff options
author | Simon Glass <sjg@chromium.org> | 2016-10-01 14:42:33 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-10-11 10:17:08 -0600 |
commit | 80793db9091b40cf0078568bb5359be0e7f43e89 (patch) | |
tree | e3d10c582e74f71e42e76f65763fc9f8df975b06 /arch/sandbox/include | |
parent | bf635ed091dee333f4458eec617a4124b51322fc (diff) | |
download | u-boot-80793db9091b40cf0078568bb5359be0e7f43e89.zip u-boot-80793db9091b40cf0078568bb5359be0e7f43e89.tar.gz u-boot-80793db9091b40cf0078568bb5359be0e7f43e89.tar.bz2 |
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 <sjg@chromium.org>
Fixes: 3bfb8cb4 (dm: regmap: Implement simple regmap_read & regmap_write)
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r-- | arch/sandbox/include/asm/io.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 6919632..a685635 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); |