Message ID | 20230206100837.451300-8-vladimir.oltean@nxp.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | NXP ENETC AF_XDP zero-copy sockets | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 7 of 7 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 39 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index 33950c81e53c..fe6a3a531a0a 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -77,8 +77,8 @@ static void enetc_unmap_tx_buff(struct enetc_bdr *tx_ring, tx_swbd->dma = 0; } -static void enetc_free_tx_frame(struct enetc_bdr *tx_ring, - struct enetc_tx_swbd *tx_swbd) +static void enetc_free_tx_swbd(struct enetc_bdr *tx_ring, + struct enetc_tx_swbd *tx_swbd) { struct xdp_frame *xdp_frame = enetc_tx_swbd_get_xdp_frame(tx_swbd); struct sk_buff *skb = enetc_tx_swbd_get_skb(tx_swbd); @@ -331,7 +331,7 @@ static int enetc_map_tx_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb) do { tx_swbd = &tx_ring->tx_swbd[i]; - enetc_free_tx_frame(tx_ring, tx_swbd); + enetc_free_tx_swbd(tx_ring, tx_swbd); if (i == 0) i = tx_ring->bd_count; i--; @@ -580,7 +580,7 @@ static int enetc_map_tx_tso_buffs(struct enetc_bdr *tx_ring, struct sk_buff *skb err_chained_bd: do { tx_swbd = &tx_ring->tx_swbd[i]; - enetc_free_tx_frame(tx_ring, tx_swbd); + enetc_free_tx_swbd(tx_ring, tx_swbd); if (i == 0) i = tx_ring->bd_count; i--; @@ -1986,11 +1986,8 @@ static void enetc_free_tx_ring(struct enetc_bdr *tx_ring) { int i; - for (i = 0; i < tx_ring->bd_count; i++) { - struct enetc_tx_swbd *tx_swbd = &tx_ring->tx_swbd[i]; - - enetc_free_tx_frame(tx_ring, tx_swbd); - } + for (i = 0; i < tx_ring->bd_count; i++) + enetc_free_tx_swbd(tx_ring, &tx_ring->tx_swbd[i]); } static void enetc_free_rx_ring(struct enetc_bdr *rx_ring)
Create naming consistency between the free procedures for a TX and an RX software BD. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> --- drivers/net/ethernet/freescale/enetc/enetc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)