Skip to content

Commit bbd6043

Browse files
vladimirolteankuba-moo
authored andcommitted
net: enetc: drop redundant enetc_free_tx_frame() call from enetc_free_txbdr()
The call path in enetc_close() is: enetc_close() -> enetc_free_rxtx_rings() -> enetc_free_tx_ring() -> enetc_free_tx_frame() -> enetc_free_tx_resources() -> enetc_free_txbdr() -> enetc_free_tx_frame() The enetc_free_tx_frame() function is written such that the second call exits without doing anything, but nonetheless, it is completely redundant. Delete it. This makes the TX teardown path more similar to the RX one, where rx_swbd freeing is done in enetc_free_rx_ring(), not in enetc_free_rxbdr(). Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2c33871 commit bbd6043

File tree

1 file changed

+0
-5
lines changed
  • drivers/net/ethernet/freescale/enetc

1 file changed

+0
-5
lines changed

drivers/net/ethernet/freescale/enetc/enetc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,11 +1773,6 @@ static int enetc_alloc_txbdr(struct enetc_bdr *txr)
17731773

17741774
static void enetc_free_txbdr(struct enetc_bdr *txr)
17751775
{
1776-
int i;
1777-
1778-
for (i = 0; i < txr->bd_count; i++)
1779-
enetc_free_tx_frame(txr, &txr->tx_swbd[i]);
1780-
17811776
dma_free_coherent(txr->dev, txr->bd_count * TSO_HEADER_SIZE,
17821777
txr->tso_headers, txr->tso_headers_dma);
17831778
txr->tso_headers = NULL;

0 commit comments

Comments
 (0)