RE: [PATCH net-next 3/5] net: fec: remove struct fec_enet_priv_txrx_info
From: Wei Fang
Date: Tue Nov 11 2025 - 20:57:16 EST
> On Tue, Nov 11, 2025 at 06:00:55PM +0800, Wei Fang wrote:
> > The struct fec_enet_priv_txrx_info has three members: offset, page and
> > skb. The offset is only initialized in the driver and is not used, and
>
> the skb is never initialized and used in the driver. The both will not be used in the
> future, Therefore, replace struct fec_enet_priv_txrx_info directly with struct
> page.
>
> > we can see that it likely will not be used in the future. The skb is
> > never initialized and used in the driver. Therefore, struct
> > fec_enet_priv_txrx_info can be directly replaced by struct page.
> >
> > Signed-off-by: Wei Fang <wei.fang@xxxxxxx>
> > ---
> > drivers/net/ethernet/freescale/fec.h | 8 +-------
> > drivers/net/ethernet/freescale/fec_main.c | 11 +++++------
> > 2 files changed, 6 insertions(+), 13 deletions(-)
> >
> ...
> >
> > @@ -1834,7 +1833,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16
> queue_id, int budget)
> > ndev->stats.rx_bytes += pkt_len;
> >
> > index = fec_enet_get_bd_index(bdp, &rxq->bd);
> > - page = rxq->rx_skb_info[index].page;
> > + page = rxq->rx_buf[index];
> > cbd_bufaddr = bdp->cbd_bufaddr;
> > if (fec_enet_update_cbd(rxq, bdp, index)) {
> > ndev->stats.rx_dropped++;
> > @@ -3309,7 +3308,8 @@ static void fec_enet_free_buffers(struct net_device
> *ndev)
> > for (q = 0; q < fep->num_rx_queues; q++) {
> > rxq = fep->rx_queue[q];
> > for (i = 0; i < rxq->bd.ring_size; i++)
> > - page_pool_put_full_page(rxq->page_pool,
> rxq->rx_skb_info[i].page, false);
> > + page_pool_put_full_page(rxq->page_pool, rxq->rx_buf[i],
> > + false);
>
> move to previous line.
The line should no more than 80 characters