From: Mark Cave-Ayland Date: Tue, 15 Jul 2025 09:25:41 +0000 (+0100) Subject: vfio/vfio-container-base.h: update VFIOContainerBase declaration X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42875d256d204e69b608f2bd265f85fae32dd4bd;p=thirdparty%2Fqemu.git vfio/vfio-container-base.h: update VFIOContainerBase declaration Update the VFIOContainerBase declaration to match our current coding guidelines: remove the explicit typedef (this is already handled by the OBJECT_DECLARE_TYPE() macro), add a blank line after the parent object, rename parent to parent_obj, and move the macro declaration next to the VFIOContainerBase struct declaration. Signed-off-by: Mark Cave-Ayland Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/qemu-devel/20250715093110.107317-2-mark.caveayland@nutanix.com Signed-off-by: Cédric Le Goater --- diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h index bded6e993ff..acbd48a18a3 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container-base.h @@ -33,8 +33,9 @@ typedef struct VFIOAddressSpace { /* * This is the base object for vfio container backends */ -typedef struct VFIOContainerBase { - Object parent; +struct VFIOContainerBase { + Object parent_obj; + VFIOAddressSpace *space; MemoryListener listener; Error *error; @@ -51,7 +52,10 @@ typedef struct VFIOContainerBase { QLIST_HEAD(, VFIODevice) device_list; GList *iova_ranges; NotifierWithReturn cpr_reboot_notifier; -} VFIOContainerBase; +}; + +#define TYPE_VFIO_IOMMU "vfio-iommu" +OBJECT_DECLARE_TYPE(VFIOContainerBase, VFIOIOMMUClass, VFIO_IOMMU) typedef struct VFIOGuestIOMMU { VFIOContainerBase *bcontainer; @@ -105,14 +109,11 @@ vfio_container_get_page_size_mask(const VFIOContainerBase *bcontainer) return bcontainer->pgsizes; } -#define TYPE_VFIO_IOMMU "vfio-iommu" #define TYPE_VFIO_IOMMU_LEGACY TYPE_VFIO_IOMMU "-legacy" #define TYPE_VFIO_IOMMU_SPAPR TYPE_VFIO_IOMMU "-spapr" #define TYPE_VFIO_IOMMU_IOMMUFD TYPE_VFIO_IOMMU "-iommufd" #define TYPE_VFIO_IOMMU_USER TYPE_VFIO_IOMMU "-user" -OBJECT_DECLARE_TYPE(VFIOContainerBase, VFIOIOMMUClass, VFIO_IOMMU) - struct VFIOIOMMUClass { ObjectClass parent_class;