]> git.baikalelectronics.ru Git - kernel.git/commitdiff
r8169: inline rtl8169_mark_as_last_descriptor
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 19 Apr 2020 21:07:39 +0000 (23:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 19:27:14 +0000 (12:27 -0700)
rtl8169_mark_as_last_descriptor() has just one user, so inline it.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c

index 1bc415d00cb840415c74d3c79d32b6507b0d5849..3b8ae49c3ea2b6bb3bbd44b90476bb5d3d4ac875 100644 (file)
@@ -3939,11 +3939,6 @@ static void rtl8169_rx_clear(struct rtl8169_private *tp)
        }
 }
 
-static inline void rtl8169_mark_as_last_descriptor(struct RxDesc *desc)
-{
-       desc->opts1 |= cpu_to_le32(RingEnd);
-}
-
 static int rtl8169_rx_fill(struct rtl8169_private *tp)
 {
        unsigned int i;
@@ -3959,7 +3954,8 @@ static int rtl8169_rx_fill(struct rtl8169_private *tp)
                tp->Rx_databuff[i] = data;
        }
 
-       rtl8169_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1);
+       /* mark as last descriptor in the ring */
+       tp->RxDescArray[NUM_RX_DESC - 1].opts1 |= cpu_to_le32(RingEnd);
 
        return 0;
 }