Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'enetc-trivial-ptp-one-step-tx-timestamping-cleanups'

Vladimir Oltean says:

====================
enetc: trivial PTP one-step TX timestamping cleanups

These are two cleanup patches for some inconsistencies
I noticed in the driver's TX ring cleanup function.
====================

Link: https://lore.kernel.org/r/20211020174220.1093032-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+2 -6
+2 -6
drivers/net/ethernet/freescale/enetc/enetc.c
··· 813 813 bool is_eof = tx_swbd->is_eof; 814 814 815 815 if (unlikely(tx_swbd->check_wb)) { 816 - struct enetc_ndev_priv *priv = netdev_priv(ndev); 817 - union enetc_tx_bd *txbd; 818 - 819 - txbd = ENETC_TXBD(*tx_ring, i); 816 + union enetc_tx_bd *txbd = ENETC_TXBD(*tx_ring, i); 820 817 821 818 if (txbd->flags & ENETC_TXBD_FLAGS_W && 822 819 tx_swbd->do_twostep_tstamp) { ··· 831 834 if (xdp_frame) { 832 835 xdp_return_frame(xdp_frame); 833 836 } else if (skb) { 834 - if (unlikely(tx_swbd->skb->cb[0] & 835 - ENETC_F_TX_ONESTEP_SYNC_TSTAMP)) { 837 + if (unlikely(skb->cb[0] & ENETC_F_TX_ONESTEP_SYNC_TSTAMP)) { 836 838 /* Start work to release lock for next one-step 837 839 * timestamping packet. And send one skb in 838 840 * tx_skbs queue if has.