Skip to content

Commit fb1b53f

Browse files
author
Christoph Hellwig
committed
parisc/sba_iommu: remove the mapping_error dma_map_ops method
The SBA iommu code already returns (~(dma_addr_t)0x0) on mapping failures, so we can switch over to returning DMA_MAPPING_ERROR 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 748c3c4 commit fb1b53f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

drivers/parisc/sba_iommu.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@
9393

9494
#define DEFAULT_DMA_HINT_REG 0
9595

96-
#define SBA_MAPPING_ERROR (~(dma_addr_t)0)
97-
9896
struct sba_device *sba_list;
9997
EXPORT_SYMBOL_GPL(sba_list);
10098

@@ -725,7 +723,7 @@ sba_map_single(struct device *dev, void *addr, size_t size,
725723

726724
ioc = GET_IOC(dev);
727725
if (!ioc)
728-
return SBA_MAPPING_ERROR;
726+
return DMA_MAPPING_ERROR;
729727

730728
/* save offset bits */
731729
offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK;
@@ -1080,11 +1078,6 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
10801078

10811079
}
10821080

1083-
static int sba_mapping_error(struct device *dev, dma_addr_t dma_addr)
1084-
{
1085-
return dma_addr == SBA_MAPPING_ERROR;
1086-
}
1087-
10881081
static const struct dma_map_ops sba_ops = {
10891082
.dma_supported = sba_dma_supported,
10901083
.alloc = sba_alloc,
@@ -1093,7 +1086,6 @@ static const struct dma_map_ops sba_ops = {
10931086
.unmap_page = sba_unmap_page,
10941087
.map_sg = sba_map_sg,
10951088
.unmap_sg = sba_unmap_sg,
1096-
.mapping_error = sba_mapping_error,
10971089
};
10981090

10991091

0 commit comments

Comments
 (0)