On 2021-03-16 1:58 a.m., Christoph Hellwig wrote: > On Fri, Mar 12, 2021 at 11:27:46AM -0700, Logan Gunthorpe wrote: >> So then we reject the patches that make that change. Seems like an odd >> argument to say that we can't do something that won't cause problems >> because someone might use it as an example and do something that will >> cause problems. Reject the change that causes the problem. > > No, the problem is a mess of calling conventions. A calling convention > returning 0 for error, positive values for success is fine. One returning > a negative errno for error and positive values for success is fine a well. > One returning 0 for the usual errors and negativ errnos for an unusual > corner case is just a complete mess. Fair enough. I can try implementing a dma_map_sg_p2p() roughly as Robin suggested that has a more reasonable calling convention. Most of your other feedback seems easy enough so I'll address it in a future series. Thanks, Logan _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
- Re: [RFC PATCH v2 08/11] iommu/dma: Support... Robin Murphy
- Re: [RFC PATCH v2 08/11] iommu/dma: Sup... Logan Gunthorpe
- [RFC PATCH v2 09/11] block: Add BLK_STS_P2PDMA Logan Gunthorpe
- Re: [RFC PATCH v2 09/11] block: Add BLK_STS_P2PDMA Christoph Hellwig
- [RFC PATCH v2 06/11] dma-direct: Support PCI P2PDMA page... Logan Gunthorpe
- Re: [RFC PATCH v2 06/11] dma-direct: Support PCI P2... Robin Murphy
- Re: [RFC PATCH v2 06/11] dma-direct: Support PC... Logan Gunthorpe
- Re: [RFC PATCH v2 06/11] dma-direct: Suppor... Robin Murphy
- Re: [RFC PATCH v2 06/11] dma-direct: Su... Logan Gunthorpe
- Re: [RFC PATCH v2 06/11] dma-direc... Christoph Hellwig
- Re: [RFC PATCH v2 06/11] dma-d... Logan Gunthorpe
- Re: [RFC PATCH v2 06/11] dma-direct: Su... Christoph Hellwig
- Re: [RFC PATCH v2 06/11] dma-direct: Support PCI P2... Christoph Hellwig
- [RFC PATCH v2 01/11] PCI/P2PDMA: Pass gfp_mask flags to ... Logan Gunthorpe
- Re: [RFC PATCH v2 01/11] PCI/P2PDMA: Pass gfp_mask ... Bjorn Helgaas
- Re: [RFC PATCH v2 01/11] PCI/P2PDMA: Pass gfp_m... Logan Gunthorpe
- [RFC PATCH v2 11/11] nvme-pci: Convert to using dma_map_... Logan Gunthorpe
- Re: [RFC PATCH v2 11/11] nvme-pci: Convert to using... Jason Gunthorpe
- Re: [RFC PATCH v2 11/11] nvme-pci: Convert to u... Logan Gunthorpe
- [RFC PATCH v2 03/11] PCI/P2PDMA: Attempt to set map_type... Logan Gunthorpe
- Re: [RFC PATCH v2 00/11] Add support to dma_map_sg for P... Robin Murphy