Skip to content

Commit

Permalink
r8169: inline rtl8169_mark_as_last_descriptor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Apr 20, 2020
1 parent a500677 commit 2ac1fa4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 2ac1fa4

Please sign in to comment.