]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/type1: Refactor vfio_iommu_type1_ioctl()
authorLiu Yi L <yi.l.liu@intel.com>
Sun, 12 Jul 2020 11:20:56 +0000 (04:20 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 27 Jul 2020 19:46:13 +0000 (13:46 -0600)
commitd0d8fcee814cf106b17fe4df3782c741379dcfc0
tree0f4119aee0cdd8d379a55f019afc5eba54fb115c
parenta536a77e681a973219d6b992419b62cc0c8d5703
vfio/type1: Refactor vfio_iommu_type1_ioctl()

This patch refactors the vfio_iommu_type1_ioctl() to use switch instead of
if-else, and each command got a helper function.

Cc: Kevin Tian <kevin.tian@intel.com>
CC: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c