diff options
author | Christoph Hellwig <hch@lst.de> | 2018-11-21 13:00:17 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-06 09:56:41 -0500 |
commit | fb1b53f16c5e457eac8837407da37f29bf0a509a (patch) | |
tree | 0066511731ed08c54c4b7ef89e217221d8825b88 /drivers/parisc | |
parent | 748c3c4d13232c96a9b173a4cc46406e12b1c8e5 (diff) |
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>
Diffstat (limited to 'drivers/parisc')
-rw-r--r-- | drivers/parisc/sba_iommu.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index c1e599a429af..452d306ce5cb 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -93,8 +93,6 @@ | |||
93 | 93 | ||
94 | #define DEFAULT_DMA_HINT_REG 0 | 94 | #define DEFAULT_DMA_HINT_REG 0 |
95 | 95 | ||
96 | #define SBA_MAPPING_ERROR (~(dma_addr_t)0) | ||
97 | |||
98 | struct sba_device *sba_list; | 96 | struct sba_device *sba_list; |
99 | EXPORT_SYMBOL_GPL(sba_list); | 97 | EXPORT_SYMBOL_GPL(sba_list); |
100 | 98 | ||
@@ -725,7 +723,7 @@ sba_map_single(struct device *dev, void *addr, size_t size, | |||
725 | 723 | ||
726 | ioc = GET_IOC(dev); | 724 | ioc = GET_IOC(dev); |
727 | if (!ioc) | 725 | if (!ioc) |
728 | return SBA_MAPPING_ERROR; | 726 | return DMA_MAPPING_ERROR; |
729 | 727 | ||
730 | /* save offset bits */ | 728 | /* save offset bits */ |
731 | offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK; | 729 | offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK; |
@@ -1080,11 +1078,6 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
1080 | 1078 | ||
1081 | } | 1079 | } |
1082 | 1080 | ||
1083 | static int sba_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
1084 | { | ||
1085 | return dma_addr == SBA_MAPPING_ERROR; | ||
1086 | } | ||
1087 | |||
1088 | static const struct dma_map_ops sba_ops = { | 1081 | static const struct dma_map_ops sba_ops = { |
1089 | .dma_supported = sba_dma_supported, | 1082 | .dma_supported = sba_dma_supported, |
1090 | .alloc = sba_alloc, | 1083 | .alloc = sba_alloc, |
@@ -1093,7 +1086,6 @@ static const struct dma_map_ops sba_ops = { | |||
1093 | .unmap_page = sba_unmap_page, | 1086 | .unmap_page = sba_unmap_page, |
1094 | .map_sg = sba_map_sg, | 1087 | .map_sg = sba_map_sg, |
1095 | .unmap_sg = sba_unmap_sg, | 1088 | .unmap_sg = sba_unmap_sg, |
1096 | .mapping_error = sba_mapping_error, | ||
1097 | }; | 1089 | }; |
1098 | 1090 | ||
1099 | 1091 | ||