Skip to content

Commit 52f0b3e

Browse files
author
Christoph Hellwig
committed
arm64: remove the dummy_dma_ops mapping_error method
Just return DMA_MAPPING_ERROR from __dummy_map_page and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fb1b53f commit 52f0b3e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/arm64/mm/dma-mapping.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static dma_addr_t __dummy_map_page(struct device *dev, struct page *page,
119119
enum dma_data_direction dir,
120120
unsigned long attrs)
121121
{
122-
return 0;
122+
return DMA_MAPPING_ERROR;
123123
}
124124

125125
static void __dummy_unmap_page(struct device *dev, dma_addr_t dev_addr,
@@ -154,11 +154,6 @@ static void __dummy_sync_sg(struct device *dev,
154154
{
155155
}
156156

157-
static int __dummy_mapping_error(struct device *hwdev, dma_addr_t dma_addr)
158-
{
159-
return 1;
160-
}
161-
162157
static int __dummy_dma_supported(struct device *hwdev, u64 mask)
163158
{
164159
return 0;
@@ -176,7 +171,6 @@ const struct dma_map_ops dummy_dma_ops = {
176171
.sync_single_for_device = __dummy_sync_single,
177172
.sync_sg_for_cpu = __dummy_sync_sg,
178173
.sync_sg_for_device = __dummy_sync_sg,
179-
.mapping_error = __dummy_mapping_error,
180174
.dma_supported = __dummy_dma_supported,
181175
};
182176
EXPORT_SYMBOL(dummy_dma_ops);

0 commit comments

Comments
 (0)