mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 10:31:33 -04:00
net: macb: drop "consistent" from alloc/free function names
Since commit 4df95131ea ("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().
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://patch.msgid.link/20260812-macb-context-v9-1-7ddbf5f715e0@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
09b7c00d55
commit
ba6f76db61
@@ -2646,7 +2646,7 @@ static unsigned int macb_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;
|
||||
@@ -2728,7 +2728,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;
|
||||
@@ -2786,7 +2786,7 @@ static int macb_alloc_consistent(struct macb *bp)
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
macb_free_consistent(bp);
|
||||
macb_free(bp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -3174,7 +3174,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);
|
||||
@@ -3219,7 +3219,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;
|
||||
@@ -3252,7 +3252,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);
|
||||
|
||||
Reference in New Issue
Block a user