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 00/16] .map_sg() error cleanup Logan Gunthorpe
- Re: [PATCH v1 00/16] .map_sg() error cleanup Russell King (Oracle)
- Re: [PATCH v1 00/16] .map_sg() error cleanu... Logan Gunthorpe
- [PATCH v1 15/16] dma-mapping: return error code... Logan Gunthorpe
- [PATCH v1 16/16] dma-mapping: Disallow .map_sg ... Logan Gunthorpe
- Re: [PATCH v1 16/16] dma-mapping: Disallow ... Christoph Hellwig
- Re: [PATCH v1 16/16] dma-mapping: Disal... Robin Murphy
- Re: [PATCH v1 16/16] dma-mapping: Disal... Logan Gunthorpe
- [PATCH v1 04/16] dma-iommu: Return error code f... Logan Gunthorpe
- Re: [PATCH v1 04/16] dma-iommu: Return erro... Christoph Hellwig
- [PATCH v1 08/16] MIPS/jazzdma: return error cod... Logan Gunthorpe
- [PATCH v1 10/16] s390/pci: return error code fr... Logan Gunthorpe
- Re: [PATCH v1 10/16] s390/pci: return error... Niklas Schnelle
- [PATCH v1 05/16] alpha: return error code from ... Logan Gunthorpe
- [PATCH v1 01/16] dma-mapping: Allow map_sg() op... Logan Gunthorpe
- Re: [PATCH v1 01/16] dma-mapping: Allow map... Christoph Hellwig
- [PATCH v1 11/16] sparc/iommu: return error code... Logan Gunthorpe
- [PATCH v1 02/16] dma-direct: Return appropriate... Logan Gunthorpe