2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00

tile: fix tilepro casts for readl, writel, etc

Missing parentheses could cause an argument of the form
"integer + pointer" to get cast to "(long)integer + pointer"
and remain a pointer type, causing compiler warnings.

Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
This commit is contained in:
Chris Metcalf 2015-12-21 13:03:03 -05:00
parent f3a26163fa
commit acfb699e3d

View File

@ -161,14 +161,14 @@ extern void _tile_writew(u16 val, unsigned long addr);
extern void _tile_writel(u32 val, unsigned long addr);
extern void _tile_writeq(u64 val, unsigned long addr);
#define __raw_readb(addr) _tile_readb((unsigned long)addr)
#define __raw_readw(addr) _tile_readw((unsigned long)addr)
#define __raw_readl(addr) _tile_readl((unsigned long)addr)
#define __raw_readq(addr) _tile_readq((unsigned long)addr)
#define __raw_writeb(val, addr) _tile_writeb(val, (unsigned long)addr)
#define __raw_writew(val, addr) _tile_writew(val, (unsigned long)addr)
#define __raw_writel(val, addr) _tile_writel(val, (unsigned long)addr)
#define __raw_writeq(val, addr) _tile_writeq(val, (unsigned long)addr)
#define __raw_readb(addr) _tile_readb((unsigned long)(addr))
#define __raw_readw(addr) _tile_readw((unsigned long)(addr))
#define __raw_readl(addr) _tile_readl((unsigned long)(addr))
#define __raw_readq(addr) _tile_readq((unsigned long)(addr))
#define __raw_writeb(val, addr) _tile_writeb(val, (unsigned long)(addr))
#define __raw_writew(val, addr) _tile_writew(val, (unsigned long)(addr))
#define __raw_writel(val, addr) _tile_writel(val, (unsigned long)(addr))
#define __raw_writeq(val, addr) _tile_writeq(val, (unsigned long)(addr))
#else /* CONFIG_PCI */