aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/common.c
diff options
context:
space:
mode:
authorZhenzhong Duan <zhenzhong.duan@intel.com>2024-05-07 14:42:44 +0800
committerCédric Le Goater <clg@redhat.com>2024-05-16 16:59:20 +0200
commitb77548355ab5d8c8377ba8f981c7c597507de37a (patch)
treee70d40f836675b943ee765c32bf6b7f41b89b029 /hw/vfio/common.c
parentf3758413b77d396dd4db68643f7068fb49ec77d9 (diff)
downloadqemu-b77548355ab5d8c8377ba8f981c7c597507de37a.zip
qemu-b77548355ab5d8c8377ba8f981c7c597507de37a.tar.gz
qemu-b77548355ab5d8c8377ba8f981c7c597507de37a.tar.bz2
vfio: Make VFIOIOMMUClass::attach_device() and its wrapper return bool
Make VFIOIOMMUClass::attach_device() and its wrapper function vfio_attach_device() return bool. This is to follow the coding standand to return bool if 'Error **' is used to pass error. 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/common.c')
-rw-r--r--hw/vfio/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 1fbd108..c04a259 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -1523,8 +1523,8 @@ retry:
return info;
}
-int vfio_attach_device(char *name, VFIODevice *vbasedev,
- AddressSpace *as, Error **errp)
+bool vfio_attach_device(char *name, VFIODevice *vbasedev,
+ AddressSpace *as, Error **errp)
{
const VFIOIOMMUClass *ops =
VFIO_IOMMU_CLASS(object_class_by_name(TYPE_VFIO_IOMMU_LEGACY));