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 <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250715093110.107317-2-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
Mark Cave-Ayland 2025-07-15 10:25:41 +01:00 committed by Cédric Le Goater
parent bb1a6f1f43
commit 42875d256d

View file

@ -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;