diff options
| author | Cédric Le Goater <clg@redhat.com> | 2025-03-26 08:50:58 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-04-25 09:01:37 +0200 |
| commit | 0778f9b3bef0438530e1dd0d277571405637d880 (patch) | |
| tree | d75918af4553737486c455bb73a6293b5dd85d54 | |
| parent | aa90d775f0f568239f2a6bd3ead7e8d3b4a35a57 (diff) | |
| download | focaccia-qemu-0778f9b3bef0438530e1dd0d277571405637d880.tar.gz focaccia-qemu-0778f9b3bef0438530e1dd0d277571405637d880.zip | |
vfio: Make vfio_group_list static
vfio_group_list is only used in file "container.c". Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-13-clg@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-14-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
| -rw-r--r-- | hw/vfio/container.c | 3 | ||||
| -rw-r--r-- | include/hw/vfio/vfio-common.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/hw/vfio/container.c b/hw/vfio/container.c index bda1942662..8a216b24b5 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) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index bcdbc9de57..d806349475 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; |