Hi

This is a cleanup series to change functions in hw/vfio/ to return bool 
when the error is passed through errp parameter, also some cleanup
with g_autofree.

See discussion at 
https://lists.gnu.org/archive/html/qemu-devel/2024-04/msg04782.html

This series processed below files:
hw/vfio/container.c
hw/vfio/iommufd.c
hw/vfio/cpr.c
backends/iommufd.c

So above files are clean now, there are still other files need processing
in hw/vfio.

Test done on x86 platform:
vfio device hotplug/unplug with different backend
reboot

Thanks
Zhenzhong

Changelog:
v2:
- split out g_autofree code as a patch (Cédric)
- add processing for more files

Zhenzhong Duan (11):
  vfio/pci: Use g_autofree in vfio_realize
  vfio/pci: Use g_autofree in iommufd_cdev_get_info_iova_range()
  vfio: Make VFIOIOMMUClass::attach_device() and its wrapper return bool
  vfio: Make VFIOIOMMUClass::setup() return bool
  vfio: Make VFIOIOMMUClass::add_window() and its wrapper return bool
  vfio/container: Make vfio_connect_container() return bool
  vfio/container: Make vfio_set_iommu() return bool
  vfio/container: Make vfio_get_device() return bool
  vfio/iommufd: Make iommufd_cdev_*() return bool
  vfio/cpr: Make vfio_cpr_register_container() return bool
  backends/iommufd: Make iommufd_backend_*() return bool

 include/hw/vfio/vfio-common.h         |   6 +-
 include/hw/vfio/vfio-container-base.h |  18 ++---
 include/sysemu/iommufd.h              |   6 +-
 backends/iommufd.c                    |  29 +++----
 hw/vfio/ap.c                          |   6 +-
 hw/vfio/ccw.c                         |   6 +-
 hw/vfio/common.c                      |   6 +-
 hw/vfio/container-base.c              |   8 +-
 hw/vfio/container.c                   |  81 +++++++++----------
 hw/vfio/cpr.c                         |   4 +-
 hw/vfio/iommufd.c                     | 109 +++++++++++---------------
 hw/vfio/pci.c                         |  12 ++-
 hw/vfio/platform.c                    |   7 +-
 hw/vfio/spapr.c                       |  28 +++----
 backends/trace-events                 |   4 +-
 15 files changed, 147 insertions(+), 183 deletions(-)

-- 
2.34.1


Reply via email to