summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/vfio_main.c
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2023-02-03 16:50:27 -0500
committerAlex Williamson <alex.williamson@redhat.com>2023-02-09 11:41:25 -0700
commitb0d2d5697e4c12589ef536b2a824f6549fdb2c01 (patch)
tree33128ea8e7e609efc2024ccafe267de33c99594e /drivers/vfio/vfio_main.c
parent2b48f52f2bff8e8926165983f3a3d7b89b33de08 (diff)
downloadlinux-b0d2d5697e4c12589ef536b2a824f6549fdb2c01.tar.gz
linux-b0d2d5697e4c12589ef536b2a824f6549fdb2c01.tar.bz2
linux-b0d2d5697e4c12589ef536b2a824f6549fdb2c01.zip
vfio: no need to pass kvm pointer during device open
Nothing uses this value during vfio_device_open anymore so it's safe to remove it. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Tested-by: Tony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20230203215027.151988-3-mjrosato@linux.ibm.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/vfio_main.c')
-rw-r--r--drivers/vfio/vfio_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
index 28c47cd6a6b5..3a597e799918 100644
--- a/drivers/vfio/vfio_main.c
+++ b/drivers/vfio/vfio_main.c
@@ -397,7 +397,7 @@ static bool vfio_assert_device_open(struct vfio_device *device)
}
static int vfio_device_first_open(struct vfio_device *device,
- struct iommufd_ctx *iommufd, struct kvm *kvm)
+ struct iommufd_ctx *iommufd)
{
int ret;
@@ -444,8 +444,7 @@ static void vfio_device_last_close(struct vfio_device *device,
module_put(device->dev->driver->owner);
}
-int vfio_device_open(struct vfio_device *device,
- struct iommufd_ctx *iommufd, struct kvm *kvm)
+int vfio_device_open(struct vfio_device *device, struct iommufd_ctx *iommufd)
{
int ret = 0;
@@ -453,7 +452,7 @@ int vfio_device_open(struct vfio_device *device,
device->open_count++;
if (device->open_count == 1) {
- ret = vfio_device_first_open(device, iommufd, kvm);
+ ret = vfio_device_first_open(device, iommufd);
if (ret)
device->open_count--;
}