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

dmaengine: ptdma: Remove unused pointer dma_cmd_cache

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

Signed-off-by: Eder Zulian <ezulian@redhat.com>
Reviewed-by: Nathan Lynch <nathan.lynch@amd.com>
Link: https://lore.kernel.org/r/20250415121312.870124-1-ezulian@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Eder Zulian and committed by
Vinod Koul
f087965a 82922fca

+4 -13
+4 -12
drivers/dma/amd/ptdma/ptdma-dmaengine.c
··· 590 590 desc_cache_name = devm_kasprintf(pt->dev, GFP_KERNEL, 591 591 "%s-dmaengine-desc-cache", 592 592 dev_name(pt->dev)); 593 - if (!desc_cache_name) { 594 - ret = -ENOMEM; 595 - goto err_cache; 596 - } 593 + if (!desc_cache_name) 594 + return -ENOMEM; 597 595 598 596 pt->dma_desc_cache = kmem_cache_create(desc_cache_name, 599 597 sizeof(struct pt_dma_desc), 0, 600 598 SLAB_HWCACHE_ALIGN, NULL); 601 - if (!pt->dma_desc_cache) { 602 - ret = -ENOMEM; 603 - goto err_cache; 604 - } 599 + if (!pt->dma_desc_cache) 600 + return -ENOMEM; 605 601 606 602 dma_dev->dev = pt->dev; 607 603 dma_dev->src_addr_widths = DMA_SLAVE_BUSWIDTH_64_BYTES; ··· 651 655 err_reg: 652 656 kmem_cache_destroy(pt->dma_desc_cache); 653 657 654 - err_cache: 655 - kmem_cache_destroy(pt->dma_cmd_cache); 656 - 657 658 return ret; 658 659 } 659 660 EXPORT_SYMBOL_GPL(pt_dmaengine_register); ··· 662 669 dma_async_device_unregister(dma_dev); 663 670 664 671 kmem_cache_destroy(pt->dma_desc_cache); 665 - kmem_cache_destroy(pt->dma_cmd_cache); 666 672 }
-1
drivers/dma/amd/ptdma/ptdma.h
··· 254 254 /* Support for the DMA Engine capabilities */ 255 255 struct dma_device dma_dev; 256 256 struct pt_dma_chan *pt_dma_chan; 257 - struct kmem_cache *dma_cmd_cache; 258 257 struct kmem_cache *dma_desc_cache; 259 258 260 259 wait_queue_head_t lsb_queue;