]> git.ipfire.org Git - thirdparty/linux.git/commit
net: macb: drop `entry` local variable in macb_tx_map()
authorThéo Lebrun <theo.lebrun@bootlin.com>
Tue, 14 Oct 2025 15:25:13 +0000 (17:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 23:59:27 +0000 (16:59 -0700)
commit027202adf07952d9b4d7a3199fe1014a537e7a81
tree180a57b91a147dcf2f88a13ea7a887b8b4d7e6d6
parentf26c6438a285157e24973b4188d75d4674def46c
net: macb: drop `entry` local variable in macb_tx_map()

The pattern:
   entry = macb_tx_ring_wrap(bp, i);
   tx_skb = &queue->tx_skb[entry];
is the exact definition of:
   macb_tx_skb(queue, i);

The pattern:
   entry = macb_tx_ring_wrap(bp, i);
   desc = macb_tx_desc(queue, entry);
is redundant because macb_tx_desc() calls macb_tx_ring_wrap().

One explicit call to macb_tx_ring_wrap() is still required for checking
if it is the last buffer (TX_WRAP case).

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://patch.msgid.link/20251014-macb-cleanup-v1-12-31cd266e22cd@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c