Re: [PATCH v1 09/14] vfio/type1: Refactor pfn_list clearing

2021-03-10 Thread Christoph Hellwig
> +/* Return 1 if iommu->lock dropped and notified, 0 if done */ A bool would be more useful for that pattern. > +static int unmap_dma_pfn_list(struct vfio_iommu *iommu, struct vfio_dma *dma, > + struct vfio_dma **dma_last, int *retries) > +{ > + if

[PATCH v1 09/14] vfio/type1: Refactor pfn_list clearing

2021-03-08 Thread Alex Williamson
Pull code out to a function for re-use. Signed-off-by: Alex Williamson --- drivers/vfio/vfio_iommu_type1.c | 57 +++ 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index