Re: [PATCH net-next v3 01/15] net: macb: drop "consistent" from alloc/free function names
From: Nicolai Buchwitz <hidden>
Date: 2026-07-02 10:41:29
Also in:
lkml
On 1.7.2026 17:59, Théo Lebrun wrote:
quoted hunk ↗ jump to hunk
Since commit 4df95131ea80 ("net/macb: change RX path for GEM") those functions have not been only allocating or freeing consistent memory mappings. Rename from macb_alloc_consistent() to macb_alloc() and from macb_free_consistent() to macb_free(). Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> --- drivers/net/ethernet/cadence/macb_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)diff --git a/drivers/net/ethernet/cadence/macb_main.cb/drivers/net/ethernet/cadence/macb_main.c index fd282a1700fb..d677a93b9d72 100644--- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c@@ -2646,7 +2646,7 @@ static unsigned intmacb_rx_ring_size_per_queue(struct macb *bp) return macb_dma_desc_get_size(bp) * bp->rx_ring_size + bp->rx_bd_rd_prefetch; } -static void macb_free_consistent(struct macb *bp) +static void macb_free(struct macb *bp) { struct device *dev = &bp->pdev->dev; struct macb_queue *queue;@@ -2711,7 +2711,7 @@ static int macb_alloc_rx_buffers(struct macb *bp) return 0; } -static int macb_alloc_consistent(struct macb *bp) +static int macb_alloc(struct macb *bp) { struct device *dev = &bp->pdev->dev; dma_addr_t tx_dma, rx_dma;@@ -2769,7 +2769,7 @@ static int macb_alloc_consistent(struct macb *bp) return 0; out_err: - macb_free_consistent(bp); + macb_free(bp); return -ENOMEM; }@@ -3157,7 +3157,7 @@ static int macb_open(struct net_device *dev) /* RX buffers initialization */ macb_init_rx_buffer_size(bp, bufsz); - err = macb_alloc_consistent(bp); + err = macb_alloc(bp); if (err) { netdev_err(dev, "Unable to allocate DMA memory (error %d)\n", err);@@ -3202,7 +3202,7 @@ static int macb_open(struct net_device *dev) napi_disable(&queue->napi_rx); napi_disable(&queue->napi_tx); } - macb_free_consistent(bp); + macb_free(bp); pm_exit: pm_runtime_put_sync(&bp->pdev->dev); return err;@@ -3235,7 +3235,7 @@ static int macb_close(struct net_device *dev) netif_carrier_off(dev); spin_unlock_irqrestore(&bp->lock, flags); - macb_free_consistent(bp); + macb_free(bp); if (bp->ptp_info) bp->ptp_info->ptp_remove(dev);
Reviewed-by: Nicolai Buchwitz <redacted> Thanks Nicolai