Skip to contentSkip to conversation

qom: Use TYPE_* constants

PATCH In review Eduardo Habkost 8 participants 25 messages Aug 26, 2020 – Aug 27, 2020

lore
Share & tools
lore
#0 lore raw

cover qom: Use TYPE_* constants

Clean up code that uses hardcoded strings instead of TYPE_* constants when defining QOM types.

Eduardo Habkost (8):
etsec: Use TYPE_ETSEC_COMMON constant
nios2_iic: Use TYPE_ALTERA_IIC constant
amd_iommu: Use TYPE_AMD_IOMMU_PCI constant
sclpconsole: Use TYPE_* constants
xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant
tosa: Use TYPE_TOSA_MISC_GPIO constant
ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant
dc390: Use TYPE_DC390_DEVICE constant

 hw/arm/tosa.c            | 2 +-
 hw/arm/xlnx-zcu102.c     | 2 +-
 hw/char/sclpconsole-lm.c | 2 +-
 hw/char/sclpconsole.c    | 2 +-
 hw/i386/amd_iommu.c      | 2 +-
 hw/intc/nios2_iic.c      | 2 +-
 hw/net/fsl_etsec/etsec.c | 2 +-
 hw/pci-host/ppce500.c    | 2 +-
 hw/scsi/esp-pci.c        | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/8 etsec: Use TYPE_ETSEC_COMMON constant

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: David Gibson <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/net/fsl_etsec/etsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/fsl_etsec/etsec.c +1 -1
index 7035cf4eb9..ad20b22cdd 100644
@@ -430,7 +430,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo etsec_info = {
-    .name                  = "eTSEC",
+    .name                  = TYPE_ETSEC_COMMON,
     .parent                = TYPE_SYS_BUS_DEVICE,
     .instance_size         = sizeof(eTSEC),
     .class_init            = etsec_class_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 1/8
#2 lore raw

Re: [PATCH 1/8] etsec: Use TYPE_ETSEC_COMMON constant

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:46写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 26 lines

---
Cc: David Gibson <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/net/fsl_etsec/etsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/fsl_etsec/etsec.c +1 -2
index 7035cf4eb9..ad20b22cdd 100644
@@ -430,7 +430,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo etsec_info = {
-    .name                  = "eTSEC",
+    .name                  = TYPE_ETSEC_COMMON,
     .parent                = TYPE_SYS_BUS_DEVICE,
     .instance_size         = sizeof(eTSEC),
     .class_init            = etsec_class_init,
--

2.26.2

Acked-by on v1 1/8
#3 lore raw

Re: [PATCH 1/8] etsec: Use TYPE_ETSEC_COMMON constant

In reply to Eduardo Habkost
Quoted 3 lines · Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 22 lines

---
Cc: David Gibson <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/net/fsl_etsec/etsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/fsl_etsec/etsec.c +1 -1
index 7035cf4eb9..ad20b22cdd 100644
@@ -430,7 +430,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo etsec_info = {
-    .name                  = "eTSEC",
+    .name                  = TYPE_ETSEC_COMMON,
     .parent                = TYPE_SYS_BUS_DEVICE,
     .instance_size         = sizeof(eTSEC),
     .class_init            = etsec_class_init,
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#4 lore raw

PATCH 2/8 nios2_iic: Use TYPE_ALTERA_IIC constant

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Chris Wulff <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: [email protected]

---
 hw/intc/nios2_iic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/nios2_iic.c +1 -1
index 1a5df8c89a..86d088f9b5 100644
@@ -80,7 +80,7 @@ static void altera_iic_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo altera_iic_info = {
-    .name          = "altera,iic",
+    .name          = TYPE_ALTERA_IIC,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(AlteraIIC),
     .instance_init = altera_iic_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 2/8
#5 lore raw

Re: [PATCH 2/8] nios2_iic: Use TYPE_ALTERA_IIC constant

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:44写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 25 lines

---
Cc: Chris Wulff <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: [email protected]

---
 hw/intc/nios2_iic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/nios2_iic.c +1 -2
index 1a5df8c89a..86d088f9b5 100644
@@ -80,7 +80,7 @@ static void altera_iic_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo altera_iic_info = {
-    .name          = "altera,iic",
+    .name          = TYPE_ALTERA_IIC,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(AlteraIIC),
     .instance_init = altera_iic_init,
--

2.26.2

#6 lore raw

PATCH 3/8 amd_iommu: Use TYPE_AMD_IOMMU_PCI constant

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: [email protected]

---
 hw/i386/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/amd_iommu.c +1 -1
index 087f601666..18411f1dec 100644
@@ -1622,7 +1622,7 @@ static const TypeInfo amdvi = {
 };
 
 static const TypeInfo amdviPCI = {
-    .name = "AMDVI-PCI",
+    .name = TYPE_AMD_IOMMU_PCI,
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(AMDVIPCIState),
     .interfaces = (InterfaceInfo[]) {
Signature · 1 line
2.26.2
Reviewed-by on v1 3/8
#7 lore raw

Re: [PATCH 3/8] amd_iommu: Use TYPE_AMD_IOMMU_PCI constant

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:48写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 28 lines

---
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: [email protected]

---
 hw/i386/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/amd_iommu.c +1 -2
index 087f601666..18411f1dec 100644
@@ -1622,7 +1622,7 @@ static const TypeInfo amdvi = {
 };
 
 static const TypeInfo amdviPCI = {
-    .name = "AMDVI-PCI",
+    .name = TYPE_AMD_IOMMU_PCI,
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(AMDVIPCIState),
     .interfaces = (InterfaceInfo[]) {
--

2.26.2

Reviewed-by on v1 3/8
#8 lore raw

Re: [PATCH 3/8] amd_iommu: Use TYPE_AMD_IOMMU_PCI constant

In reply to Eduardo Habkost
Quoted 10 lines · Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: [email protected]

feel free to merge with the rest of the patch.

Quoted 19 lines
---
 hw/i386/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/amd_iommu.c +1 -1
index 087f601666..18411f1dec 100644
@@ -1622,7 +1622,7 @@ static const TypeInfo amdvi = {
 };
 
 static const TypeInfo amdviPCI = {
-    .name = "AMDVI-PCI",
+    .name = TYPE_AMD_IOMMU_PCI,
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(AMDVIPCIState),
     .interfaces = (InterfaceInfo[]) {
Signature · 1 line
2.26.2
#9 lore raw

PATCH 4/8 sclpconsole: Use TYPE_* constants

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Cornelia Huck <[email protected]>
Cc: Halil Pasic <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/char/sclpconsole-lm.c | 2 +-
 hw/char/sclpconsole.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/char/sclpconsole-lm.c +1 -1
index 2b5f37b6a2..5848b4e9c5 100644
@@ -355,7 +355,7 @@ static void console_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_console_info = {
-    .name          = "sclplmconsole",
+    .name          = TYPE_SCLPLM_CONSOLE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPConsoleLM),
     .class_init    = console_class_init,
hw/char/sclpconsole.c +1 -1
index 5c7664905e..d6f7da0818 100644
@@ -271,7 +271,7 @@ static void console_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_console_info = {
-    .name          = "sclpconsole",
+    .name          = TYPE_SCLP_CONSOLE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPConsole),
     .class_init    = console_class_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 4/8
#10 lore raw

Re: [PATCH 4/8] sclpconsole: Use TYPE_* constants

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:45写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 44 lines

---
Cc: Cornelia Huck <[email protected]>
Cc: Halil Pasic <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/char/sclpconsole-lm.c | 2 +-
 hw/char/sclpconsole.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/char/sclpconsole-lm.c +1 -1
index 2b5f37b6a2..5848b4e9c5 100644
@@ -355,7 +355,7 @@ static void console_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_console_info = {
-    .name          = "sclplmconsole",
+    .name          = TYPE_SCLPLM_CONSOLE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPConsoleLM),
     .class_init    = console_class_init,
hw/char/sclpconsole.c +1 -2
index 5c7664905e..d6f7da0818 100644
@@ -271,7 +271,7 @@ static void console_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_console_info = {
-    .name          = "sclpconsole",
+    .name          = TYPE_SCLP_CONSOLE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPConsole),
     .class_init    = console_class_init,
--

2.26.2

Reviewed-by on v1 4/8
#11 lore raw

Re: [PATCH 4/8] sclpconsole: Use TYPE_* constants

In reply to Eduardo Habkost
Quoted 36 lines · Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Cornelia Huck <[email protected]>
Cc: Halil Pasic <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/char/sclpconsole-lm.c | 2 +-
 hw/char/sclpconsole.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/char/sclpconsole-lm.c +1 -1
index 2b5f37b6a2..5848b4e9c5 100644
@@ -355,7 +355,7 @@ static void console_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_console_info = {
-    .name          = "sclplmconsole",
+    .name          = TYPE_SCLPLM_CONSOLE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPConsoleLM),
     .class_init    = console_class_init,
hw/char/sclpconsole.c +0 -0
index 5c7664905e..d6f7da0818 100644

hw/char/sclpconsole.c static void console_class_init(ObjectClass *klass, void *data) · line 277

Quoted 8 lines
hw/char/sclpconsole.c +1 -1
@@ -271,7 +271,7 @@ static void console_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo sclp_console_info = {
-    .name          = "sclpconsole",
+    .name          = TYPE_SCLP_CONSOLE,
     .parent        = TYPE_SCLP_EVENT,
     .instance_size = sizeof(SCLPConsole),
     .class_init    = console_class_init,
Acked-by on v1 4/8
#12 lore raw

Re: [PATCH 4/8] sclpconsole: Use TYPE_* constants

In reply to Eduardo Habkost
Quoted 12 lines · On Wed, 26 Aug 2020 14:43:30 -0400 Eduardo Habkost <[email protected]> wrote:

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Cornelia Huck <[email protected]>
Cc: Halil Pasic <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]

Quoted 4 lines
---
 hw/char/sclpconsole-lm.c | 2 +-
 hw/char/sclpconsole.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
#13 lore raw

PATCH 5/8 xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Alistair Francis <[email protected]>
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/xlnx-zcu102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zcu102.c +1 -1
index 5997262459..672d9d4bd1 100644
@@ -238,7 +238,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
 }
 
 static const TypeInfo xlnx_zcu102_machine_init_typeinfo = {
-    .name       = MACHINE_TYPE_NAME("xlnx-zcu102"),
+    .name       = TYPE_ZCU102_MACHINE,
     .parent     = TYPE_MACHINE,
     .class_init = xlnx_zcu102_machine_class_init,
     .instance_init = xlnx_zcu102_machine_instance_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 5/8
#14 lore raw

Re: [PATCH 5/8] xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant

Quoted 3 lines · Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 26 lines

---
Cc: Alistair Francis <[email protected]>
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/xlnx-zcu102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zcu102.c +1 -1
index 5997262459..672d9d4bd1 100644
@@ -238,7 +238,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
 }
 
 static const TypeInfo xlnx_zcu102_machine_init_typeinfo = {
-    .name       = MACHINE_TYPE_NAME("xlnx-zcu102"),
+    .name       = TYPE_ZCU102_MACHINE,
     .parent     = TYPE_MACHINE,
     .class_init = xlnx_zcu102_machine_class_init,
     .instance_init = xlnx_zcu102_machine_instance_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 5/8
#15 lore raw

Re: [PATCH 5/8] xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant

In reply to Eduardo Habkost
Quoted 4 lines · Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

Alistair

Quoted 27 lines

---
Cc: Alistair Francis <[email protected]>
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/xlnx-zcu102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zcu102.c +1 -2
index 5997262459..672d9d4bd1 100644
@@ -238,7 +238,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
 }
 
 static const TypeInfo xlnx_zcu102_machine_init_typeinfo = {
-    .name       = MACHINE_TYPE_NAME("xlnx-zcu102"),
+    .name       = TYPE_ZCU102_MACHINE,
     .parent     = TYPE_MACHINE,
     .class_init = xlnx_zcu102_machine_class_init,
     .instance_init = xlnx_zcu102_machine_instance_init,
--

2.26.2

Reviewed-by on v1 5/8
#16 lore raw

Re: [PATCH 5/8] xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant

In reply to Eduardo Habkost
Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:47写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 27 lines

---
Cc: Alistair Francis <[email protected]>
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/xlnx-zcu102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-zcu102.c +1 -2
index 5997262459..672d9d4bd1 100644
@@ -238,7 +238,7 @@ static void xlnx_zcu102_machine_class_init(ObjectClass *oc, void *data)
 }
 
 static const TypeInfo xlnx_zcu102_machine_init_typeinfo = {
-    .name       = MACHINE_TYPE_NAME("xlnx-zcu102"),
+    .name       = TYPE_ZCU102_MACHINE,
     .parent     = TYPE_MACHINE,
     .class_init = xlnx_zcu102_machine_class_init,
     .instance_init = xlnx_zcu102_machine_instance_init,
--

2.26.2

#17 lore raw

PATCH 6/8 tosa: Use TYPE_TOSA_MISC_GPIO constant

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Andrzej Zaborowski <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/tosa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/tosa.c +1 -1
index e29566f7b3..90eef1f14d 100644
@@ -316,7 +316,7 @@ static const TypeInfo tosa_ssp_info = {
 };
 
 static const TypeInfo tosa_misc_gpio_info = {
-    .name          = "tosa-misc-gpio",
+    .name          = TYPE_TOSA_MISC_GPIO,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(TosaMiscGPIOState),
     .instance_init = tosa_misc_gpio_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 6/8
#18 lore raw

Re: [PATCH 6/8] tosa: Use TYPE_TOSA_MISC_GPIO constant

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:50写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 26 lines

---
Cc: Andrzej Zaborowski <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/arm/tosa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/tosa.c +1 -2
index e29566f7b3..90eef1f14d 100644
@@ -316,7 +316,7 @@ static const TypeInfo tosa_ssp_info = {
 };
 
 static const TypeInfo tosa_misc_gpio_info = {
-    .name          = "tosa-misc-gpio",
+    .name          = TYPE_TOSA_MISC_GPIO,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(TosaMiscGPIOState),
     .instance_init = tosa_misc_gpio_init,
--

2.26.2

#19 lore raw

PATCH 7/8 ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: David Gibson <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/pci-host/ppce500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/ppce500.c +1 -1
index d71072731d..1a62b2f8cc 100644
@@ -509,7 +509,7 @@ static void e500_host_bridge_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo e500_host_bridge_info = {
-    .name          = "e500-host-bridge",
+    .name          = TYPE_PPC_E500_PCI_BRIDGE,
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PPCE500PCIBridgeState),
     .class_init    = e500_host_bridge_class_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 7/8
#20 lore raw

Re: [PATCH 7/8] ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:51写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 25 lines

---
Cc: David Gibson <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/pci-host/ppce500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/ppce500.c +1 -2
index d71072731d..1a62b2f8cc 100644
@@ -509,7 +509,7 @@ static void e500_host_bridge_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo e500_host_bridge_info = {
-    .name          = "e500-host-bridge",
+    .name          = TYPE_PPC_E500_PCI_BRIDGE,
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PPCE500PCIBridgeState),
     .class_init    = e500_host_bridge_class_init,
--

2.26.2

Acked-by on v1 7/8
#21 lore raw

Re: [PATCH 7/8] ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant

In reply to Eduardo Habkost
Quoted 3 lines · Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 21 lines

---
Cc: David Gibson <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 hw/pci-host/ppce500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/ppce500.c +1 -1
index d71072731d..1a62b2f8cc 100644
@@ -509,7 +509,7 @@ static void e500_host_bridge_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo e500_host_bridge_info = {
-    .name          = "e500-host-bridge",
+    .name          = TYPE_PPC_E500_PCI_BRIDGE,
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PPCE500PCIBridgeState),
     .class_init    = e500_host_bridge_class_init,
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#22 lore raw

PATCH 8/8 dc390: Use TYPE_DC390_DEVICE constant

In reply to Eduardo Habkost

This will make future conversion to use OBJECT_DECLARE* easier.

---
Cc: Paolo Bonzini <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: [email protected]

---
 hw/scsi/esp-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/scsi/esp-pci.c +1 -1
index 497a8d5901..90432ef107 100644
@@ -521,7 +521,7 @@ static void dc390_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo dc390_info = {
-    .name = "dc390",
+    .name = TYPE_DC390_DEVICE,
     .parent = TYPE_AM53C974_DEVICE,
     .instance_size = sizeof(DC390State),
     .class_init = dc390_class_init,
Signature · 1 line
2.26.2
Reviewed-by on v1 8/8
#23 lore raw

Re: [PATCH 8/8] dc390: Use TYPE_DC390_DEVICE constant

Quoted 4 lines · Eduardo Habkost <[email protected]> 于2020年8月27日周四 上午2:44写道:

This will make future conversion to use OBJECT_DECLARE* easier.

Quoted 25 lines

---
Cc: Paolo Bonzini <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: [email protected]

---
 hw/scsi/esp-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/scsi/esp-pci.c +1 -2
index 497a8d5901..90432ef107 100644
@@ -521,7 +521,7 @@ static void dc390_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo dc390_info = {
-    .name = "dc390",
+    .name = TYPE_DC390_DEVICE,
     .parent = TYPE_AM53C974_DEVICE,
     .instance_size = sizeof(DC390State),
     .class_init = dc390_class_init,
--

2.26.2

#24 lore raw
In reply to Eduardo Habkost
Quoted 2 lines · Eduardo Habkost

Clean up code that uses hardcoded strings instead of TYPE_* constants when defining QOM types.

I'm queueing this on machine-next.

Signature · 1 line
Eduardo