r8169: use lower_32_bits/upper_32_bits macros
Heiner Kallweit
maintainerPATCH 1/1 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 <[email protected]>
--- drivers/net/ethernet/realtek/r8169_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -4
@@ -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);
Signature · 1 line
2.31.0
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 6 lines · On Fri, 19 Mar 2021 09:58:36 +0100 you wrote:
Use the lower_32_bits/upper_32_bits macros to simplify the code.
Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/ethernet/realtek/r8169_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Here is the summary with links:
- [net-next] r8169: use lower_32_bits/upper_32_bits macros
https://git.kernel.org/netdev/net-next/c/b498ee3f7613
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html