Thread (47 messages) 47 messages, 7 authors, 2021-03-24

Re: [RFC PATCH v2 07/11] dma-mapping: Add flags to dma_map_ops to indicate PCI P2PDMA support

From: Ira Weiny <hidden>
Date: 2021-03-13 02:38:02
Also in: linux-iommu, linux-mm, linux-nvme, linux-pci, lkml

On Thu, Mar 11, 2021 at 04:31:37PM -0700, Logan Gunthorpe wrote:
 
+int dma_pci_p2pdma_supported(struct device *dev)
   ^^^
  bool?
+{
+	const struct dma_map_ops *ops = get_dma_ops(dev);
+
+	return !ops || ops->flags & DMA_F_PCI_P2PDMA_SUPPORTED;
Is this logic correct?  I would have expected.

	return (ops && ops->flags & DMA_F_PCI_P2PDMA_SUPPORTED);

Ira
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help