Skip to content

Commit

Permalink
net: rtl8169: Fix compile warning in rtl8169
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
  • Loading branch information
mindachen1987 authored and Leo Yu-Chi Liang committed Aug 2, 2023
1 parent 8db2224 commit a6a0d6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/net/rtl8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6a0d6a

Please sign in to comment.