vfio_group_list is only used in file "container.c".

Reviewed-by: John Levon <john.le...@nutanix.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.d...@intel.com>
Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-13-...@redhat.com
Link: 
https://lore.kernel.org/qemu-devel/20250326075122.1299361-14-...@redhat.com
Signed-off-by: Cédric Le Goater <c...@redhat.com>
---
 include/hw/vfio/vfio-common.h | 2 --
 hw/vfio/container.c           | 3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index 
bcdbc9de57dd11c2c93252b983ec4e4190a82fe5..d8063494757cf61a3019c321f5c1174099ccd74f
 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -146,9 +146,7 @@ int vfio_kvm_device_del_fd(int fd, Error **errp);
 bool vfio_cpr_register_container(VFIOContainerBase *bcontainer, Error **errp);
 void vfio_cpr_unregister_container(VFIOContainerBase *bcontainer);
 
-typedef QLIST_HEAD(VFIOGroupList, VFIOGroup) VFIOGroupList;
 typedef QLIST_HEAD(VFIODeviceList, VFIODevice) VFIODeviceList;
-extern VFIOGroupList vfio_group_list;
 extern VFIODeviceList vfio_device_list;
 extern const MemoryListener vfio_memory_listener;
 extern int vfio_kvm_device_fd;
diff --git a/hw/vfio/container.c b/hw/vfio/container.c
index 
bda1942662d1da24c3a47db0f4a389a2a0fbec7e..8a216b24b5dea630f3488ace73ecf04a7e7cf735
 100644
--- a/hw/vfio/container.c
+++ b/hw/vfio/container.c
@@ -34,7 +34,8 @@
 #include "pci.h"
 #include "hw/vfio/vfio-container.h"
 
-VFIOGroupList vfio_group_list =
+typedef QLIST_HEAD(VFIOGroupList, VFIOGroup) VFIOGroupList;
+static VFIOGroupList vfio_group_list =
     QLIST_HEAD_INITIALIZER(vfio_group_list);
 
 static int vfio_ram_block_discard_disable(VFIOContainer *container, bool state)
-- 
2.49.0


Reply via email to