On 21/05/2019 17:15, Li Qiang wrote:
The QOMConventions recommends we should use TYPE_FOO
for a TypeInfo's name. Though "vfio-pci-nohotplug" is not
used in other parts, for consistency we should make this change.

CC: qemu-triv...@nongnu.org
Signed-off-by: Li Qiang <liq...@163.com>
---
  hw/vfio/pci.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 8cecb53d5c..08729e5875 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -40,6 +40,8 @@
  #define TYPE_VFIO_PCI "vfio-pci"
  #define PCI_VFIO(obj)    OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI)
+#define TYPE_VIFO_PCI_NOHOTPLUG "vfio-pci-nohotplug"
+
  static void vfio_disable_interrupts(VFIOPCIDevice *vdev);
  static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled);
@@ -3304,8 +3306,8 @@ static void vfio_pci_nohotplug_dev_class_init(ObjectClass *klass, void *data)
  }
static const TypeInfo vfio_pci_nohotplug_dev_info = {
-    .name = "vfio-pci-nohotplug",
-    .parent = "vfio-pci",
+    .name = TYPE_VIFO_PCI_NOHOTPLUG,
+    .parent = TYPE_VFIO_PCI,
      .instance_size = sizeof(VFIOPCIDevice),
      .class_init = vfio_pci_nohotplug_dev_class_init,
  };


Applied to my trivial-patches branch.

Thanks,
Laurent

Reply via email to