提交 e6655d7c 编写于 作者: B Bin Meng 提交者: Tom Rini

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: NBin Meng <bmeng.cn@gmail.com>
Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
上级 4019e54d
...@@ -240,23 +240,23 @@ static void eepro100_halt (struct eth_device *dev); ...@@ -240,23 +240,23 @@ static void eepro100_halt (struct eth_device *dev);
static inline int INW (struct eth_device *dev, u_long addr) 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) 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) 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) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
static inline int INL (struct eth_device *dev, u_long addr) 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, static int get_phyreg (struct eth_device *dev, unsigned char addr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册