Hi This is the last round of cleanup series to change functions in hw/vfio/ to return bool when the error is passed through errp parameter.
The first round is at https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg01147.html I see Cédric is also working on some migration stuff cleanup, so didn't touch migration.c, but all other files in hw/vfio/ are cleanup now. Patch1 and patch20 are fix patch, all others are cleanup patches. Test done on x86 platform: vfio device hotplug/unplug with different backend reboot This series is rebased to https://github.com/legoater/qemu/tree/vfio-next Thanks Zhenzhong Changelog: v2: - add patch17 to use g_autofree in all callsite of vfio_get_region_info() (Cédric) - add patch18 to use g_autofree in vfio_probe_igd_bar4_quirk() - add patch19 to drop local err in vfio_ccw_realize() (Cédric) - add patch20 to fix a bug I just found - add R-B Zhenzhong Duan (20): vfio/display: Fix error path in call site of ramfb_setup() vfio/display: Make vfio_display_*() return bool vfio/helpers: Use g_autofree in vfio_set_irq_signaling() vfio/helpers: Make vfio_set_irq_signaling() return bool vfio/helpers: Make vfio_device_get_name() return bool vfio/platform: Make vfio_populate_device() and vfio_base_device_init() return bool vfio/ccw: Make vfio_ccw_get_region() return a bool vfio/pci: Make vfio_intx_enable_kvm() return a bool vfio/pci: Make vfio_pci_relocate_msix() and vfio_msix_early_setup() return a bool vfio/pci: Make vfio_populate_device() return a bool vfio/pci: Make vfio_intx_enable() return bool vfio/pci: Make vfio_populate_vga() return bool vfio/pci: Make capability related functions return bool vfio/pci: Use g_autofree for vfio_region_info pointer vfio/pci-quirks: Make vfio_pci_igd_opregion_init() return bool vfio/pci-quirks: Make vfio_add_*_cap() return bool vfio: Use g_autofree in all call site of vfio_get_region_info() vfio/igd: Use g_autofree in vfio_probe_igd_bar4_quirk() vfio/ccw: Drop local @err in vfio_ccw_realize() vfio/ccw: Fix the missed unrealize() call in error path hw/vfio/pci.h | 12 +- include/hw/vfio/vfio-common.h | 6 +- hw/vfio/ap.c | 10 +- hw/vfio/ccw.c | 47 ++++--- hw/vfio/display.c | 22 +-- hw/vfio/helpers.c | 36 ++--- hw/vfio/igd.c | 35 +++-- hw/vfio/pci-quirks.c | 50 ++++--- hw/vfio/pci.c | 243 ++++++++++++++++------------------ hw/vfio/platform.c | 61 ++++----- 10 files changed, 241 insertions(+), 281 deletions(-) -- 2.34.1