Skip to content

Commit 580a0cc

Browse files
author
Christoph Hellwig
committed
dma-contiguous: remove dma_contiguous_set_default
dma_contiguous_set_default contains a trivial assignment, and has a single caller that is compiled if CONFIG_CMA_DMA is enabled. Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 5af6389 commit 580a0cc

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

include/linux/dma-contiguous.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ static inline struct cma *dev_get_cma_area(struct device *dev)
6666
return dma_contiguous_default_area;
6767
}
6868

69-
static inline void dma_contiguous_set_default(struct cma *cma)
70-
{
71-
dma_contiguous_default_area = cma;
72-
}
73-
7469
void dma_contiguous_reserve(phys_addr_t addr_limit);
7570

7671
int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base,
@@ -91,8 +86,6 @@ static inline struct cma *dev_get_cma_area(struct device *dev)
9186
return NULL;
9287
}
9388

94-
static inline void dma_contiguous_set_default(struct cma *cma) { }
95-
9689
static inline void dma_contiguous_reserve(phys_addr_t limit) { }
9790

9891
static inline int dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base,

kernel/dma/contiguous.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static int __init rmem_cma_setup(struct reserved_mem *rmem)
407407
dma_contiguous_early_fixup(rmem->base, rmem->size);
408408

409409
if (default_cma)
410-
dma_contiguous_set_default(cma);
410+
dma_contiguous_default_area = cma;
411411

412412
rmem->ops = &rmem_cma_ops;
413413
rmem->priv = cma;

0 commit comments

Comments
 (0)