[PATCH 25/27] vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()

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 25/27] vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()
Posted by Mark Cave-Ayland 5 days, 1 hour ago
This is the more typical naming convention for QOM init() functions, in
particular it changes the prefix to match the name of the QOM type.

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

diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
index 30f485fdbb..52561900fd 100644
--- a/hw/vfio-user/pci.c
+++ b/hw/vfio-user/pci.c
@@ -344,7 +344,7 @@ error:
     vfio_pci_put_device(vdev);
 }
 
-static void vfio_user_instance_init(Object *obj)
+static void vfio_user_pci_init(Object *obj)
 {
     PCIDevice *pci_dev = PCI_DEVICE(obj);
     VFIOPCIDevice *vdev = VFIO_PCI_DEVICE(obj);
@@ -468,7 +468,7 @@ static const TypeInfo vfio_user_pci_dev_info = {
     .parent = TYPE_VFIO_PCI_DEVICE,
     .instance_size = sizeof(VFIOUserPCIDevice),
     .class_init = vfio_user_pci_class_init,
-    .instance_init = vfio_user_instance_init,
+    .instance_init = vfio_user_pci_init,
     .instance_finalize = vfio_user_instance_finalize,
 };
 
-- 
2.43.0
Re: [PATCH 25/27] vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()
Posted by Cédric Le Goater 4 days ago
On 9/23/25 15:53, Mark Cave-Ayland wrote:
> This is the more typical naming convention for QOM init() functions, in
> particular it changes the prefix to match the name of the QOM type.
> 
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> ---
>   hw/vfio-user/pci.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
> index 30f485fdbb..52561900fd 100644
> --- a/hw/vfio-user/pci.c
> +++ b/hw/vfio-user/pci.c
> @@ -344,7 +344,7 @@ error:
>       vfio_pci_put_device(vdev);
>   }
>   
> -static void vfio_user_instance_init(Object *obj)
> +static void vfio_user_pci_init(Object *obj)
>   {
>       PCIDevice *pci_dev = PCI_DEVICE(obj);
>       VFIOPCIDevice *vdev = VFIO_PCI_DEVICE(obj);
> @@ -468,7 +468,7 @@ static const TypeInfo vfio_user_pci_dev_info = {
>       .parent = TYPE_VFIO_PCI_DEVICE,
>       .instance_size = sizeof(VFIOUserPCIDevice),
>       .class_init = vfio_user_pci_class_init,
> -    .instance_init = vfio_user_instance_init,
> +    .instance_init = vfio_user_pci_init,
>       .instance_finalize = vfio_user_instance_finalize,
>   };
>   


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

Thanks,

C.