diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2021-03-19 11:58:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-19 22:08:21 +0300 |
commit | b498ee3f7613f5ed1deac40451486274fc93fe30 (patch) | |
tree | d227a26b4cd33259a37cd560566b2df0b7f894a6 /drivers | |
parent | fc72d4773c6b2ed860e69c646c9f3b9b9e38ad45 (diff) | |
download | linux-b498ee3f7613f5ed1deac40451486274fc93fe30.tar.xz |
r8169: use lower_32_bits/upper_32_bits macros
Use the lower_32_bits/upper_32_bits macros to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 7aad0ba53372..8ea6ddc7da5c 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -1586,12 +1586,10 @@ DECLARE_RTL_COND(rtl_counters_cond) static void rtl8169_do_counters(struct rtl8169_private *tp, u32 counter_cmd) { - dma_addr_t paddr = tp->counters_phys_addr; - u32 cmd; + u32 cmd = lower_32_bits(tp->counters_phys_addr); - RTL_W32(tp, CounterAddrHigh, (u64)paddr >> 32); + RTL_W32(tp, CounterAddrHigh, upper_32_bits(tp->counters_phys_addr)); rtl_pci_commit(tp); - cmd = (u64)paddr & DMA_BIT_MASK(32); RTL_W32(tp, CounterAddrLow, cmd); RTL_W32(tp, CounterAddrLow, cmd | counter_cmd); |