summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-01-25 01:26:26 -0800
committerTom Rini <trini@konsulko.com>2016-01-25 10:40:01 -0500
commite6655d7c23b5645602f6b1143d5e6ec858e3a431 (patch)
tree2ceb9362ebddfc4e76db606f14d61768abb91faa
parent4019e54dc69ef088a46ef644b9cc2deee498c148 (diff)
net: eepro100: Fix build warnings
When building katmai, it reports quite a lot warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fix this by casting the dev->iobase with u_long. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--drivers/net/eepro100.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index f2cd32c548..d4a6386810 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -240,23 +240,23 @@ static void eepro100_halt (struct eth_device *dev);
static inline int INW (struct eth_device *dev, u_long addr)
{
- return le16_to_cpu (*(volatile u16 *) (addr + dev->iobase));
+ return le16_to_cpu(*(volatile u16 *)(addr + (u_long)dev->iobase));
}
static inline void OUTW (struct eth_device *dev, int command, u_long addr)
{
- *(volatile u16 *) ((addr + dev->iobase)) = cpu_to_le16 (command);
+ *(volatile u16 *)((addr + (u_long)dev->iobase)) = cpu_to_le16(command);
}
static inline void OUTL (struct eth_device *dev, int command, u_long addr)
{
- *(volatile u32 *) ((addr + dev->iobase)) = cpu_to_le32 (command);
+ *(volatile u32 *)((addr + (u_long)dev->iobase)) = cpu_to_le32(command);
}
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
static inline int INL (struct eth_device *dev, u_long addr)
{
- return le32_to_cpu (*(volatile u32 *) (addr + dev->iobase));
+ return le32_to_cpu(*(volatile u32 *)(addr + (u_long)dev->iobase));
}
static int get_phyreg (struct eth_device *dev, unsigned char addr,