[PATCH 08/22] vfio-user/container.h: update VFIOUserContainer declaration

Mark Cave-Ayland posted 22 patches 4 months ago
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.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>, Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>, Steve Sistare <steven.sistare@oracle.com>, Tomita Moeko <tomitamoeko@gmail.com>
[PATCH 08/22] vfio-user/container.h: update VFIOUserContainer declaration
Posted by Mark Cave-Ayland 4 months ago
Update the VFIOUserContainer declaration so that it is closer to our coding
guidelines: remove the explicit typedef (this is already handled by the
OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object.

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

diff --git a/hw/vfio-user/container.h b/hw/vfio-user/container.h
index 2bb1fa1343..d5d2275af7 100644
--- a/hw/vfio-user/container.h
+++ b/hw/vfio-user/container.h
@@ -13,10 +13,11 @@
 #include "hw/vfio-user/proxy.h"
 
 /* MMU container sub-class for vfio-user. */
-typedef struct VFIOUserContainer {
+struct VFIOUserContainer {
     VFIOContainerBase bcontainer;
+
     VFIOUserProxy *proxy;
-} VFIOUserContainer;
+};
 
 OBJECT_DECLARE_SIMPLE_TYPE(VFIOUserContainer, VFIO_IOMMU_USER);
 
-- 
2.43.0
Re: [PATCH 08/22] vfio-user/container.h: update VFIOUserContainer declaration
Posted by Cédric Le Goater 3 months ago
On 7/15/25 11:25, Mark Cave-Ayland wrote:
> Update the VFIOUserContainer declaration so that it is closer to our coding
> guidelines: remove the explicit typedef (this is already handled by the
> OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object.
> 
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>


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

Thanks,

C.


> ---
>   hw/vfio-user/container.h | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/vfio-user/container.h b/hw/vfio-user/container.h
> index 2bb1fa1343..d5d2275af7 100644
> --- a/hw/vfio-user/container.h
> +++ b/hw/vfio-user/container.h
> @@ -13,10 +13,11 @@
>   #include "hw/vfio-user/proxy.h"
>   
>   /* MMU container sub-class for vfio-user. */
> -typedef struct VFIOUserContainer {
> +struct VFIOUserContainer {
>       VFIOContainerBase bcontainer;
> +
>       VFIOUserProxy *proxy;
> -} VFIOUserContainer;
> +};
>   
>   OBJECT_DECLARE_SIMPLE_TYPE(VFIOUserContainer, VFIO_IOMMU_USER);
>   


Re: [PATCH 08/22] vfio-user/container.h: update VFIOUserContainer declaration
Posted by John Levon 4 months ago
On Tue, Jul 15, 2025 at 10:25:48AM +0100, Mark Cave-Ayland wrote:

> Update the VFIOUserContainer declaration so that it is closer to our coding
> guidelines: remove the explicit typedef (this is already handled by the
> OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object.
> 
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
>  hw/vfio-user/container.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/vfio-user/container.h b/hw/vfio-user/container.h
> index 2bb1fa1343..d5d2275af7 100644
> --- a/hw/vfio-user/container.h
> +++ b/hw/vfio-user/container.h
> @@ -13,10 +13,11 @@
>  #include "hw/vfio-user/proxy.h"
>  
>  /* MMU container sub-class for vfio-user. */
> -typedef struct VFIOUserContainer {
> +struct VFIOUserContainer {
>      VFIOContainerBase bcontainer;
> +
>      VFIOUserProxy *proxy;
> -} VFIOUserContainer;
> +};
>  
>  OBJECT_DECLARE_SIMPLE_TYPE(VFIOUserContainer, VFIO_IOMMU_USER);
>  

Reviewed-by: John Levon <john.levon@nutanix.com>
Re: [PATCH 08/22] vfio-user/container.h: update VFIOUserContainer declaration
Posted by Philippe Mathieu-Daudé 4 months ago
On 15/7/25 11:25, Mark Cave-Ayland wrote:
> Update the VFIOUserContainer declaration so that it is closer to our coding
> guidelines: remove the explicit typedef (this is already handled by the
> OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object.
> 
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
>   hw/vfio-user/container.h | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>