qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/4] hw/southbridge/piix: Use OBJECT_DECLARE_SIMPLE_TYPE() ma


From: Bernhard Beschow
Subject: Re: [PATCH 1/4] hw/southbridge/piix: Use OBJECT_DECLARE_SIMPLE_TYPE() macro
Date: Tue, 28 Feb 2023 21:35:53 +0000


Am 10. Februar 2023 16:57:51 UTC schrieb "Philippe Mathieu-Daudé" 
<philmd@linaro.org>:
>Manually convert to OBJECT_DECLARE_SIMPLE_TYPE() macro,
>similarly to automatic conversion from commit 8063396bf3
>("Use OBJECT_DECLARE_SIMPLE_TYPE when possible").
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>---
> include/hw/southbridge/piix.h | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
>diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h
>index 0bf48e936d..a58bf13a41 100644
>--- a/include/hw/southbridge/piix.h
>+++ b/include/hw/southbridge/piix.h
>@@ -29,7 +29,7 @@
> #define PIIX_NUM_PIC_IRQS       16      /* i8259 * 2 */
> #define PIIX_NUM_PIRQS          4ULL    /* PIRQ[A-D] */
> 
>-struct PIIXState {
>+struct PIIX3State {
>     PCIDevice dev;
> 
>     /*
>@@ -57,14 +57,12 @@ struct PIIXState {
>     /* IO memory region for Reset Control Register (PIIX_RCR_IOPORT) */
>     MemoryRegion rcr_mem;
> };
>-typedef struct PIIXState PIIX3State;
> 
> #define TYPE_PIIX3_PCI_DEVICE "pci-piix3"
>-DECLARE_INSTANCE_CHECKER(PIIX3State, PIIX3_PCI_DEVICE,
>-                         TYPE_PIIX3_PCI_DEVICE)
>-
> #define TYPE_PIIX3_DEVICE "PIIX3"
> #define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen"
> #define TYPE_PIIX4_PCI_DEVICE "piix4-isa"
> 
>+OBJECT_DECLARE_SIMPLE_TYPE(PIIX3State, PIIX3_PCI_DEVICE)
>+
> #endif

The PIIX consolidation series drops the "3" for reuse by PIIX4. Do we really 
need this?



reply via email to

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