[PATCH 09/27] vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj

Mark Cave-Ayland posted 27 patches 5 days, 1 hour ago
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, "Cédric Le Goater" <clg@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, Steve Sistare <steven.sistare@oracle.com>
There is a newer version of this series
[PATCH 09/27] vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj
Posted by Mark Cave-Ayland 5 days, 1 hour ago
Now that nothing accesses the bcontainer field directly, rename bcontainer to
parent_obj as per our current coding guidelines.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
---
 hw/vfio/vfio-iommufd.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/vfio/vfio-iommufd.h b/hw/vfio/vfio-iommufd.h
index 13f412aad7..6b28e1ff7b 100644
--- a/hw/vfio/vfio-iommufd.h
+++ b/hw/vfio/vfio-iommufd.h
@@ -22,12 +22,13 @@ typedef struct VFIOIOASHwpt {
 
 typedef struct IOMMUFDBackend IOMMUFDBackend;
 
-typedef struct VFIOIOMMUFDContainer {
-    VFIOContainer bcontainer;
+struct VFIOIOMMUFDContainer {
+    VFIOContainer parent_obj;
+
     IOMMUFDBackend *be;
     uint32_t ioas_id;
     QLIST_HEAD(, VFIOIOASHwpt) hwpt_list;
-} VFIOIOMMUFDContainer;
+};
 
 OBJECT_DECLARE_SIMPLE_TYPE(VFIOIOMMUFDContainer, VFIO_IOMMU_IOMMUFD);
 
-- 
2.43.0
Re: [PATCH 09/27] vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj
Posted by Cédric Le Goater 4 days, 1 hour ago
On 9/23/25 15:53, Mark Cave-Ayland wrote:
> Now that nothing accesses the bcontainer field directly, rename bcontainer to
> parent_obj as per our current coding guidelines.
> 
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
>   hw/vfio/vfio-iommufd.h | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/vfio/vfio-iommufd.h b/hw/vfio/vfio-iommufd.h
> index 13f412aad7..6b28e1ff7b 100644
> --- a/hw/vfio/vfio-iommufd.h
> +++ b/hw/vfio/vfio-iommufd.h
> @@ -22,12 +22,13 @@ typedef struct VFIOIOASHwpt {
>   
>   typedef struct IOMMUFDBackend IOMMUFDBackend;
>   
> -typedef struct VFIOIOMMUFDContainer {
> -    VFIOContainer bcontainer;
> +struct VFIOIOMMUFDContainer {
> +    VFIOContainer parent_obj;
> +
>       IOMMUFDBackend *be;
>       uint32_t ioas_id;
>       QLIST_HEAD(, VFIOIOASHwpt) hwpt_list;
> -} VFIOIOMMUFDContainer;
> +};
>   
>   OBJECT_DECLARE_SIMPLE_TYPE(VFIOIOMMUFDContainer, VFIO_IOMMU_IOMMUFD);
>   


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.