net: fec: remove useless fec_enet_reset_skb()
Subsystems (3)
[email protected]
maintainerPATCH 1/1 net: fec: remove useless fec_enet_reset_skb()
From: Wei Fang <[email protected]>
This patch is a cleanup for fec driver. The fec_enet_reset_skb() is used to free skb buffers for tx queues and is only invoked in fec_restart(). However, fec_enet_bd_init() also resets skb buffers and is invoked in fec_restart() too. So fec_enet_reset_skb() is redundant and useless.
--- drivers/net/ethernet/freescale/fec_main.c | 21 --------------------- 1 file changed, 21 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +0 -21
@@ -1011,24 +1011,6 @@ static void fec_enet_enable_ring(struct net_device *ndev) } } -static void fec_enet_reset_skb (struct net_device *ndev) -{ -struct fec_enet_private *fep =netdev_priv (ndev); -struct fec_enet_priv_tx_q *txq; -int i, j; - -for (i =0 ; i < fep->num_tx_queues; i++) { - txq = fep->tx_queue[i]; - -for (j =0 ; j < txq->bd.ring_size; j++) { -if (txq->tx_skbuff[j]) { -dev_kfree_skb_any (txq->tx_skbuff[j]); - txq->tx_skbuff[j] =NULL ; - } - } - } -} -/* * This function is called to start or restart the FEC during a link * change, transmit timeout, or to reconfigure the FEC. The network
@@ -1071,9 +1053,6 @@ fec_restart(struct net_device *ndev)fec_enet_enable_ring (ndev); -/* Reset tx SKB buffers. */ -fec_enet_reset_skb (ndev); -/* Enable MII mode */ if (fep->full_duplex ==DUPLEX_FULL ) {/* FD enable */
Signature · 1 line
2.25.1
Quoted 10 lines · On Thu, May 18, 2023 at 09:00:16PM +0800, [email protected] wrote:
From: Wei Fang <[email protected]>
This patch is a cleanup for fec driver. The
fec_enet_reset_skb()is used to free skb buffers for tx queues and is only invoked infec_restart(). However,fec_enet_bd_init()also resets skb buffers and is invoked infec_restart()too. Sofec_enet_reset_skb()is redundant and useless.Fixes 59d0f7465644 ("net: fec: init multi queue date structure")Signed-off-by Wei Fang <[email protected]>
Hi Wei Fang,
this change looks fine to me.
But it feels much more like a cleanup than a fix to me:
what user-visible problem is it fixing?
If so, I suggest targeting against net-next without the fixes tag.
Wei Fang
maintainerQuoted 20 lines
-----Original Message-----
From: Simon Horman <[email protected]>
Sent: 2023年5月19日 1:18
To: Wei Fang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Shenwei Wang <[email protected]>; Clark Wang <[email protected]>; [email protected]; dl-linux-imx <[email protected]>; [email protected]
Subject: Re: [PATCH net] net: fec: remove uselessfec_enet_reset_skb()Quoted 8 lines · On Thu, May 18, 2023 at 09:00:16PM +0800, [email protected] wrote:
From: Wei Fang <[email protected]>
This patch is a cleanup for fec driver. The
fec_enet_reset_skb()is used to free skb buffers for tx queues and is only invoked infec_restart(). However,fec_enet_bd_init()also resets skb buffers and is invoked infec_restart()too. Sofec_enet_reset_skb()is redundant and useless.
Quoted 9 lines
Quoted 2 lines
Fixes 59d0f7465644 ("net: fec: init multi queue date structure")Signed-off-by Wei Fang <[email protected]>Hi Wei Fang,
this change looks fine to me.
But it feels much more like a cleanup than a fix to me:
what user-visible problem is it fixing?
There is no user-visible problem, just a cleanup.
Quoted 1 line
If so, I suggest targeting against net-next without the fixes tag.
Okay, I'll change the tree tag. Thank you!