On 2021-07-16 12:33 a.m., Christoph Hellwig wrote: > On Thu, Jul 15, 2021 at 10:45:44AM -0600, Logan Gunthorpe wrote: >> @@ -194,6 +194,8 @@ static int __dma_map_sg_attrs(struct device *dev, struct >> scatterlist *sg, >> else >> ents = ops->map_sg(dev, sg, nents, dir, attrs); >> >> + WARN_ON_ONCE(ents == 0); > > Turns this into a negative error code while we're at it, just to keep > the callers sane? > Sure thing. All the feedback makes sense, we'll fix it up and send a v2 in due course. Thanks, Logan
- [PATCH v1 02/16] dma-direct: Return appropriate error co... Logan Gunthorpe
- [PATCH v1 03/16] iommu: Return full error code from iomm... Logan Gunthorpe
- [PATCH v1 04/16] dma-iommu: Return error code from iommu... Logan Gunthorpe
- Re: [PATCH v1 04/16] dma-iommu: Return error code f... Christoph Hellwig
- [PATCH v1 13/16] xen: swiotlb: return error code from xe... Logan Gunthorpe
- [PATCH v1 15/16] dma-mapping: return error code from dma... Logan Gunthorpe
- [PATCH v1 11/16] sparc/iommu: return error codes from .m... Logan Gunthorpe
- [PATCH v1 16/16] dma-mapping: Disallow .map_sg operation... Logan Gunthorpe
- Re: [PATCH v1 16/16] dma-mapping: Disallow .map_sg ... Christoph Hellwig
- Re: [PATCH v1 16/16] dma-mapping: Disallow .map... Robin Murphy
- Re: [PATCH v1 16/16] dma-mapping: Disallow .map... Logan Gunthorpe
- [PATCH v1 10/16] s390/pci: return error code from s390_d... Logan Gunthorpe
- Re: [PATCH v1 10/16] s390/pci: return error code fr... Niklas Schnelle
- [PATCH v1 12/16] parisc: return error code from .map_sg(... Logan Gunthorpe
- [PATCH v1 14/16] x86/amd_gart: return error code from ga... Logan Gunthorpe
- Re: [PATCH v1 14/16] x86/amd_gart: return error cod... Christoph Hellwig
- Re: [PATCH v1 14/16] x86/amd_gart: return error... Robin Murphy
- [PATCH v1 08/16] MIPS/jazzdma: return error code from ja... Logan Gunthorpe
- [PATCH v1 09/16] powerpc/iommu: return error code from .... Logan Gunthorpe
- [PATCH v1 07/16] ia64/sba_iommu: return error code from ... Logan Gunthorpe
- [PATCH v1 06/16] ARM/dma-mapping: return error code from... Logan Gunthorpe