Commit f087965a authored by Eder Zulian's avatar Eder Zulian Committed by Vinod Koul
Browse files

dmaengine: ptdma: Remove unused pointer dma_cmd_cache



The pointer 'struct kmem_cache *dma_cmd_cache' was introduced in commit
'b0b4a6b1 ("dmaengine: ptdma: register PTDMA controller as a DMA
resource")' but it was never used.

Signed-off-by: default avatarEder Zulian <ezulian@redhat.com>
Reviewed-by: default avatarNathan Lynch <nathan.lynch@amd.com>
Link: https://lore.kernel.org/r/20250415121312.870124-1-ezulian@redhat.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 82922fca
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -590,18 +590,14 @@ int pt_dmaengine_register(struct pt_device *pt)
	desc_cache_name = devm_kasprintf(pt->dev, GFP_KERNEL,
					 "%s-dmaengine-desc-cache",
					 dev_name(pt->dev));
	if (!desc_cache_name) {
		ret = -ENOMEM;
		goto err_cache;
	}
	if (!desc_cache_name)
		return -ENOMEM;

	pt->dma_desc_cache = kmem_cache_create(desc_cache_name,
					       sizeof(struct pt_dma_desc), 0,
					       SLAB_HWCACHE_ALIGN, NULL);
	if (!pt->dma_desc_cache) {
		ret = -ENOMEM;
		goto err_cache;
	}
	if (!pt->dma_desc_cache)
		return -ENOMEM;

	dma_dev->dev = pt->dev;
	dma_dev->src_addr_widths = DMA_SLAVE_BUSWIDTH_64_BYTES;
@@ -655,9 +651,6 @@ int pt_dmaengine_register(struct pt_device *pt)
err_reg:
	kmem_cache_destroy(pt->dma_desc_cache);

err_cache:
	kmem_cache_destroy(pt->dma_cmd_cache);

	return ret;
}
EXPORT_SYMBOL_GPL(pt_dmaengine_register);
@@ -669,5 +662,4 @@ void pt_dmaengine_unregister(struct pt_device *pt)
	dma_async_device_unregister(dma_dev);

	kmem_cache_destroy(pt->dma_desc_cache);
	kmem_cache_destroy(pt->dma_cmd_cache);
}
+0 −1
Original line number Diff line number Diff line
@@ -254,7 +254,6 @@ struct pt_device {
	/* Support for the DMA Engine capabilities */
	struct dma_device dma_dev;
	struct pt_dma_chan *pt_dma_chan;
	struct kmem_cache *dma_cmd_cache;
	struct kmem_cache *dma_desc_cache;

	wait_queue_head_t lsb_queue;