vfio: refactor noiommu group creation
authorChristoph Hellwig <hch@lst.de>
Fri, 24 Sep 2021 15:56:55 +0000 (17:56 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 30 Sep 2021 18:46:44 +0000 (12:46 -0600)
commit3af917713230c8a6c3431e60601f0c7ad72eceb6
treef71757ebfa998dab528b30982aea8b762d52576b
parent1362591f15233bdc3d1fbf27e266068bd16a4e92
vfio: refactor noiommu group creation

Split the actual noiommu group creation from vfio_iommu_group_get into a
new helper, and open code the rest of vfio_iommu_group_get in its only
caller.  This creates an entirely separate and clear code path for the
noiommu group creation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20210924155705.4258-6-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c