[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Patch 3/3] vfio: remove checking duplicated vfio device
From: |
wexu |
Subject: |
[Qemu-devel] [Patch 3/3] vfio: remove checking duplicated vfio device |
Date: |
Tue, 12 Sep 2017 02:56:32 +0800 |
From: Wei Xu <address@hidden>
This has been done when introducing 'vfio_lookup_as()'
patch as a side work to reuse the loop.
Signed-off-by: Wei Xu <address@hidden>
---
hw/vfio/pci.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 856cefd..d78f756 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2632,7 +2632,6 @@ static void vfio_unregister_req_notifier(VFIOPCIDevice
*vdev)
static void vfio_realize(PCIDevice *pdev, Error **errp)
{
VFIOPCIDevice *vdev = DO_UPCAST(VFIOPCIDevice, pdev, pdev);
- VFIODevice *vbasedev_iter;
VFIOGroup *group;
char *tmp, group_path[PATH_MAX], *group_name;
Error *err = NULL;
@@ -2697,14 +2696,6 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
goto error;
}
- QLIST_FOREACH(vbasedev_iter, &group->device_list, next) {
- if (strcmp(vbasedev_iter->name, vdev->vbasedev.name) == 0) {
- error_setg(errp, "device is already attached");
- vfio_put_group(group);
- goto error;
- }
- }
-
ret = vfio_get_device(group, vdev->vbasedev.name, &vdev->vbasedev, errp);
if (ret) {
vfio_put_group(group);
--
1.8.3.1