qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 32/32] hw/isa/piix: Drop the "3" from the PIIX base class


From: Bernhard Beschow
Subject: Re: [PATCH 32/32] hw/isa/piix: Drop the "3" from the PIIX base class
Date: Sun, 18 Dec 2022 10:35:54 +0000


Am 4. Dezember 2022 19:05:53 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>Now that the base class is used for both PIIX3 and PIIX4, the "3"
>became misleading.
>
>Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>Message-Id: <20221022150508.26830-43-shentey@gmail.com>
>---

This patch could be merged into "[PATCH 19/32] hw/isa/piix3: Rename typedef 
PIIX3State to PIIXState" -- let me know!

Best regards,
Bernhard

> hw/isa/piix.c                 | 8 ++++----
> include/hw/southbridge/piix.h | 6 ++----
> 2 files changed, 6 insertions(+), 8 deletions(-)
>
>diff --git a/hw/isa/piix.c b/hw/isa/piix.c
>index 70fe1166c1..84b27b36ea 100644
>--- a/hw/isa/piix.c
>+++ b/hw/isa/piix.c
>@@ -469,7 +469,7 @@ static void pci_piix_class_init(ObjectClass *klass, void 
>*data)
> }
> 
> static const TypeInfo piix_pci_type_info = {
>-    .name = TYPE_PIIX3_PCI_DEVICE,
>+    .name = TYPE_PIIX_PCI_DEVICE,
>     .parent = TYPE_PCI_DEVICE,
>     .instance_size = sizeof(PIIXState),
>     .instance_init = pci_piix_init,
>@@ -519,7 +519,7 @@ static void piix3_class_init(ObjectClass *klass, void 
>*data)
> 
> static const TypeInfo piix3_info = {
>     .name          = TYPE_PIIX3_DEVICE,
>-    .parent        = TYPE_PIIX3_PCI_DEVICE,
>+    .parent        = TYPE_PIIX_PCI_DEVICE,
>     .instance_init = piix3_init,
>     .class_init    = piix3_class_init,
> };
>@@ -559,7 +559,7 @@ static void piix3_xen_class_init(ObjectClass *klass, void 
>*data)
> 
> static const TypeInfo piix3_xen_info = {
>     .name          = TYPE_PIIX3_XEN_DEVICE,
>-    .parent        = TYPE_PIIX3_PCI_DEVICE,
>+    .parent        = TYPE_PIIX_PCI_DEVICE,
>     .instance_init = piix3_init,
>     .class_init    = piix3_xen_class_init,
> };
>@@ -608,7 +608,7 @@ static void piix4_class_init(ObjectClass *klass, void 
>*data)
> 
> static const TypeInfo piix4_info = {
>     .name          = TYPE_PIIX4_PCI_DEVICE,
>-    .parent        = TYPE_PIIX3_PCI_DEVICE,
>+    .parent        = TYPE_PIIX_PCI_DEVICE,
>     .instance_init = piix4_init,
>     .class_init    = piix4_class_init,
> };
>diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h
>index a489f52d1b..65ad8569da 100644
>--- a/include/hw/southbridge/piix.h
>+++ b/include/hw/southbridge/piix.h
>@@ -72,11 +72,9 @@ struct PIIXState {
>     bool has_usb;
>     bool smm_enabled;
> };
>-typedef struct PIIXState PIIXState;
> 
>-#define TYPE_PIIX3_PCI_DEVICE "pci-piix3"
>-DECLARE_INSTANCE_CHECKER(PIIXState, PIIX_PCI_DEVICE,
>-                         TYPE_PIIX3_PCI_DEVICE)
>+#define TYPE_PIIX_PCI_DEVICE "pci-piix"
>+OBJECT_DECLARE_SIMPLE_TYPE(PIIXState, PIIX_PCI_DEVICE)
> 
> #define TYPE_PIIX3_DEVICE "PIIX3"
> #define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]