diff options
author | Minda Chen | 2023-07-20 19:37:26 +0800 |
---|---|---|
committer | Leo Yu-Chi Liang | 2023-08-02 11:02:32 +0800 |
commit | a6a0d6a19121c722a263714eae4d511bb2580f3c (patch) | |
tree | 959651801ce1e162904645fb3ab59e7c18581a9e | |
parent | 8db2224ffca24aab3f933618bf27d747a1a4c161 (diff) |
net: rtl8169: Fix compile warning in rtl8169
While compiling rtl8169.c, There are many "make pointer from
integer without a cast" compile warnings. fix them with
adding cast.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
-rw-r--r-- | drivers/net/rtl8169.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 2276a465e78..dcba51590d1 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -96,12 +96,12 @@ static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; #define TX_TIMEOUT (6*HZ) /* write/read MMIO register. Notice: {read,write}[wl] do the necessary swapping */ -#define RTL_W8(reg, val8) writeb((val8), ioaddr + (reg)) -#define RTL_W16(reg, val16) writew((val16), ioaddr + (reg)) -#define RTL_W32(reg, val32) writel((val32), ioaddr + (reg)) -#define RTL_R8(reg) readb(ioaddr + (reg)) -#define RTL_R16(reg) readw(ioaddr + (reg)) -#define RTL_R32(reg) readl(ioaddr + (reg)) +#define RTL_W8(reg, val8) writeb((val8), (void *)(ioaddr + (reg))) +#define RTL_W16(reg, val16) writew((val16), (void *)(ioaddr + (reg))) +#define RTL_W32(reg, val32) writel((val32), (void *)(ioaddr + (reg))) +#define RTL_R8(reg) readb((void *)(ioaddr + (reg))) +#define RTL_R16(reg) readw((void *)(ioaddr + (reg))) +#define RTL_R32(reg) readl((void *)(ioaddr + (reg))) #define bus_to_phys(a) pci_mem_to_phys((pci_dev_t)(unsigned long)dev->priv, \ (pci_addr_t)(unsigned long)a) |