Re: [PATCH 1/2] dma-mapping: remove ->mapping_error

2018-11-19 Thread Christoph Hellwig
On Fri, Nov 09, 2018 at 02:41:18PM +, Robin Murphy wrote: >> - >> #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) >> #define LOOP_TIMEOUT 10 >> @@ -2339,7 +2337,7 @@ static dma_addr_t __map_single(struct device *dev, >> paddr &= PAGE_MASK; >> address =

Re: [PATCH 1/2] dma-mapping: remove ->mapping_error

2018-11-09 Thread Robin Murphy
On 09/11/2018 08:46, Christoph Hellwig wrote: [...] diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 1167ff0416cf..cfb422e17049 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -55,8 +55,6 @@ #include "amd_iommu_types.h" #include

[PATCH 1/2] dma-mapping: remove ->mapping_error

2018-11-09 Thread Christoph Hellwig
There is no need to perform an indirect function call to check if a DMA mapping resulted in an error, if we always return the last possible dma address as the error code. While that could in theory be a valid DMAable region, it would have to assume we want to support unaligned DMAs of size 1,