Skip to content

Commit 0725695

Browse files
author
Christoph Hellwig
committed
ia64/sba_iommu: 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 52aee3e commit 0725695

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/ia64/hp/common/sba_iommu.c

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

975975
pide = sba_alloc_range(ioc, dev, size);
976976
if (pide < 0)
977-
return 0;
977+
return DMA_MAPPING_ERROR;
978978

979979
iovp = (dma_addr_t) pide << iovp_shift;
980980

@@ -2155,11 +2155,6 @@ static int sba_dma_supported (struct device *dev, u64 mask)
21552155
return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL);
21562156
}
21572157

2158-
static int sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
2159-
{
2160-
return 0;
2161-
}
2162-
21632158
__setup("nosbagart", nosbagart);
21642159

21652160
static int __init
@@ -2193,7 +2188,6 @@ const struct dma_map_ops sba_dma_ops = {
21932188
.map_sg = sba_map_sg_attrs,
21942189
.unmap_sg = sba_unmap_sg_attrs,
21952190
.dma_supported = sba_dma_supported,
2196-
.mapping_error = sba_dma_mapping_error,
21972191
};
21982192

21992193
void sba_dma_init(void)

0 commit comments

Comments
 (0)