dma-debug: Remove unused DMA attribute parameter

debug_dma_alloc_pages() always receives a DMA attribute value of 0,
because dma_alloc_pages() never receives any attributes from its callers.
As preparation for upcoming patches, remove this unused attribute from
the debug routine.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20260501-dma-attrs-debug-v2-3-8dbac75cd501@nvidia.com
This commit is contained in:
Leon Romanovsky
2026-05-01 09:35:07 +03:00
committed by Marek Szyprowski
parent 9d625aa2eb
commit 5da80b8fb3
3 changed files with 5 additions and 8 deletions

View File

@@ -1567,8 +1567,7 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
void debug_dma_alloc_pages(struct device *dev, struct page *page,
size_t size, int direction,
dma_addr_t dma_addr,
unsigned long attrs)
dma_addr_t dma_addr)
{
struct dma_debug_entry *entry;
@@ -1586,7 +1585,7 @@ void debug_dma_alloc_pages(struct device *dev, struct page *page,
entry->dev_addr = dma_addr;
entry->direction = direction;
add_dma_entry(entry, attrs);
add_dma_entry(entry, 0);
}
void debug_dma_free_pages(struct device *dev, struct page *page,

View File

@@ -47,8 +47,7 @@ extern void debug_dma_sync_sg_for_device(struct device *dev,
int nelems, int direction);
extern void debug_dma_alloc_pages(struct device *dev, struct page *page,
size_t size, int direction,
dma_addr_t dma_addr,
unsigned long attrs);
dma_addr_t dma_addr);
extern void debug_dma_free_pages(struct device *dev, struct page *page,
size_t size, int direction,
dma_addr_t dma_addr);
@@ -113,8 +112,7 @@ static inline void debug_dma_sync_sg_for_device(struct device *dev,
static inline void debug_dma_alloc_pages(struct device *dev, struct page *page,
size_t size, int direction,
dma_addr_t dma_addr,
unsigned long attrs)
dma_addr_t dma_addr)
{
}

View File

@@ -733,7 +733,7 @@ struct page *dma_alloc_pages(struct device *dev, size_t size,
if (page) {
trace_dma_alloc_pages(dev, page_to_virt(page), *dma_handle,
size, dir, gfp, 0);
debug_dma_alloc_pages(dev, page, size, dir, *dma_handle, 0);
debug_dma_alloc_pages(dev, page, size, dir, *dma_handle);
} else {
trace_dma_alloc_pages(dev, NULL, 0, size, dir, gfp, 0);
}