Skip to content

Commit 608b976

Browse files
author
Christoph Hellwig
committed
ia64/sn: remove the mapping_error dma_map_ops method
Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Linus Torvalds <[email protected]>
1 parent 0725695 commit 608b976

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/ia64/sn/pci/pci_dma.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static dma_addr_t sn_dma_map_page(struct device *dev, struct page *page,
196196

197197
if (!dma_addr) {
198198
printk(KERN_ERR "%s: out of ATEs\n", __func__);
199-
return 0;
199+
return DMA_MAPPING_ERROR;
200200
}
201201
return dma_addr;
202202
}
@@ -314,11 +314,6 @@ static int sn_dma_map_sg(struct device *dev, struct scatterlist *sgl,
314314
return nhwentries;
315315
}
316316

317-
static int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
318-
{
319-
return 0;
320-
}
321-
322317
static u64 sn_dma_get_required_mask(struct device *dev)
323318
{
324319
return DMA_BIT_MASK(64);
@@ -441,7 +436,6 @@ static struct dma_map_ops sn_dma_ops = {
441436
.unmap_page = sn_dma_unmap_page,
442437
.map_sg = sn_dma_map_sg,
443438
.unmap_sg = sn_dma_unmap_sg,
444-
.mapping_error = sn_dma_mapping_error,
445439
.dma_supported = sn_dma_supported,
446440
.get_required_mask = sn_dma_get_required_mask,
447441
};

0 commit comments

Comments
 (0)