diff options
author | Zhenzhong Duan <zhenzhong.duan@intel.com> | 2024-05-22 12:40:10 +0800 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2024-05-22 10:04:21 +0200 |
commit | d3c6a18bc7affd3b89903d98d8a3125a3e1c9861 (patch) | |
tree | 48537be1aa79bae71cf00cce8c1ce624cce35a14 /hw/vfio/pci-quirks.c | |
parent | 514855e18fcdc3378fb925046d89a0f1493336db (diff) | |
download | qemu-d3c6a18bc7affd3b89903d98d8a3125a3e1c9861.zip qemu-d3c6a18bc7affd3b89903d98d8a3125a3e1c9861.tar.gz qemu-d3c6a18bc7affd3b89903d98d8a3125a3e1c9861.tar.bz2 |
vfio/pci-quirks: Make vfio_pci_igd_opregion_init() return bool
This is to follow the coding standand in qapi/error.h to return bool
for bool-valued functions.
Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/pci-quirks.c')
-rw-r--r-- | hw/vfio/pci-quirks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index 496fd1e..ca27917 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -1169,8 +1169,8 @@ static void vfio_probe_rtl8168_bar2_quirk(VFIOPCIDevice *vdev, int nr) * the table and to write the base address of that memory to the ASLS register * of the IGD device. */ -int vfio_pci_igd_opregion_init(VFIOPCIDevice *vdev, - struct vfio_region_info *info, Error **errp) +bool vfio_pci_igd_opregion_init(VFIOPCIDevice *vdev, + struct vfio_region_info *info, Error **errp) { int ret; @@ -1181,7 +1181,7 @@ int vfio_pci_igd_opregion_init(VFIOPCIDevice *vdev, error_setg(errp, "failed to read IGD OpRegion"); g_free(vdev->igd_opregion); vdev->igd_opregion = NULL; - return -EINVAL; + return false; } /* @@ -1206,7 +1206,7 @@ int vfio_pci_igd_opregion_init(VFIOPCIDevice *vdev, pci_set_long(vdev->pdev.wmask + IGD_ASLS, ~0); pci_set_long(vdev->emulated_config_bits + IGD_ASLS, ~0); - return 0; + return true; } /* |