* [PATCH V2 net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame()
@ 2023-05-29 2:26 wei.fang
2023-05-30 7:41 ` Simon Horman
2023-05-30 14:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: wei.fang @ 2023-05-29 2:26 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, shenwei.wang, xiaoning.wang,
simon.horman, netdev
Cc: linux-imx, linux-kernel
From: Wei Fang <wei.fang@nxp.com>
The last_bdp is initialized to bdp, and both last_bdp and bdp are
not changed. That is to say that last_bdp and bdp are always equal.
So bdp can be used directly.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
V2 change:
Refine the commit message to make it more clear which is suggested
by Simon Horman.
---
drivers/net/ethernet/freescale/fec_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 632bb4d589d7..4d37a811ae15 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3770,7 +3770,7 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
struct xdp_frame *frame)
{
unsigned int index, status, estatus;
- struct bufdesc *bdp, *last_bdp;
+ struct bufdesc *bdp;
dma_addr_t dma_addr;
int entries_free;
@@ -3782,7 +3782,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
/* Fill in a Tx ring entry */
bdp = txq->bd.cur;
- last_bdp = bdp;
status = fec16_to_cpu(bdp->cbd_sc);
status &= ~BD_ENET_TX_STATS;
@@ -3810,7 +3809,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
ebdp->cbd_esc = cpu_to_fec32(estatus);
}
- index = fec_enet_get_bd_index(last_bdp, &txq->bd);
txq->tx_skbuff[index] = NULL;
/* Make sure the updates to rest of the descriptor are performed before
@@ -3825,7 +3823,7 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
bdp->cbd_sc = cpu_to_fec16(status);
/* If this was the last BD in the ring, start at the beginning again. */
- bdp = fec_enet_get_nextdesc(last_bdp, &txq->bd);
+ bdp = fec_enet_get_nextdesc(bdp, &txq->bd);
/* Make sure the update to bdp are performed before txq->bd.cur. */
dma_wmb();
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2 net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame()
2023-05-29 2:26 [PATCH V2 net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame() wei.fang
@ 2023-05-30 7:41 ` Simon Horman
2023-05-30 14:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-05-30 7:41 UTC (permalink / raw)
To: wei.fang
Cc: davem, edumazet, kuba, pabeni, shenwei.wang, xiaoning.wang,
netdev, linux-imx, linux-kernel
On Mon, May 29, 2023 at 10:26:15AM +0800, wei.fang@nxp.com wrote:
> From: Wei Fang <wei.fang@nxp.com>
>
> The last_bdp is initialized to bdp, and both last_bdp and bdp are
> not changed. That is to say that last_bdp and bdp are always equal.
> So bdp can be used directly.
>
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> ---
> V2 change:
> Refine the commit message to make it more clear which is suggested
> by Simon Horman.
Thanks!
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2 net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame()
2023-05-29 2:26 [PATCH V2 net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame() wei.fang
2023-05-30 7:41 ` Simon Horman
@ 2023-05-30 14:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-30 14:10 UTC (permalink / raw)
To: Wei Fang
Cc: davem, edumazet, kuba, pabeni, shenwei.wang, xiaoning.wang,
simon.horman, netdev, linux-imx, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 29 May 2023 10:26:15 +0800 you wrote:
> From: Wei Fang <wei.fang@nxp.com>
>
> The last_bdp is initialized to bdp, and both last_bdp and bdp are
> not changed. That is to say that last_bdp and bdp are always equal.
> So bdp can be used directly.
>
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
>
> [...]
Here is the summary with links:
- [V2,net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame()
https://git.kernel.org/netdev/net-next/c/bc638eabfed9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-30 14:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-29 2:26 [PATCH V2 net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame() wei.fang
2023-05-30 7:41 ` Simon Horman
2023-05-30 14:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).