qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "BALATON Zoltan" <balaton@eik.bme.hu>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	qemu-ppc@nongnu.org
Subject: [PULL 06/23] hw/pci-host/raven: Simplify PCI facing part
Date: Tue, 28 Oct 2025 08:48:42 +0100	[thread overview]
Message-ID: <20251028074901.22062-7-philmd@linaro.org> (raw)
In-Reply-To: <20251028074901.22062-1-philmd@linaro.org>

From: BALATON Zoltan <balaton@eik.bme.hu>

The raven PCI device does not need a state struct as it has no data to
store there any more, so we can remove that to simplify code.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-ID: <3c4cb144c24a2a729669549c4c0e6e47d230e68e.1761232472.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/pci-host/raven.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c
index c0492d14569..fa76e5170c8 100644
--- a/hw/pci-host/raven.c
+++ b/hw/pci-host/raven.c
@@ -31,7 +31,6 @@
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pci_host.h"
 #include "hw/qdev-properties.h"
-#include "migration/vmstate.h"
 #include "hw/intc/i8259.h"
 #include "hw/irq.h"
 #include "hw/or-irq.h"
@@ -40,12 +39,6 @@
 #define TYPE_RAVEN_PCI_DEVICE "raven"
 #define TYPE_RAVEN_PCI_HOST_BRIDGE "raven-pcihost"
 
-OBJECT_DECLARE_SIMPLE_TYPE(RavenPCIState, RAVEN_PCI_DEVICE)
-
-struct RavenPCIState {
-    PCIDevice dev;
-};
-
 typedef struct PRePPCIState PREPPCIState;
 DECLARE_INSTANCE_CHECKER(PREPPCIState, RAVEN_PCI_HOST_BRIDGE,
                          TYPE_RAVEN_PCI_HOST_BRIDGE)
@@ -312,16 +305,6 @@ static void raven_realize(PCIDevice *d, Error **errp)
     d->config[PCI_CAPABILITY_LIST] = 0x00;
 }
 
-static const VMStateDescription vmstate_raven = {
-    .name = "raven",
-    .version_id = 0,
-    .minimum_version_id = 0,
-    .fields = (const VMStateField[]) {
-        VMSTATE_PCI_DEVICE(dev, RavenPCIState),
-        VMSTATE_END_OF_LIST()
-    },
-};
-
 static void raven_class_init(ObjectClass *klass, const void *data)
 {
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
@@ -333,7 +316,6 @@ static void raven_class_init(ObjectClass *klass, const void *data)
     k->revision = 0x00;
     k->class_id = PCI_CLASS_BRIDGE_HOST;
     dc->desc = "PReP Host Bridge - Motorola Raven";
-    dc->vmsd = &vmstate_raven;
     /*
      * Reason: PCI-facing part of the host bridge, not usable without
      * the host-facing part, which can't be device_add'ed, yet.
@@ -344,7 +326,6 @@ static void raven_class_init(ObjectClass *klass, const void *data)
 static const TypeInfo raven_info = {
     .name = TYPE_RAVEN_PCI_DEVICE,
     .parent = TYPE_PCI_DEVICE,
-    .instance_size = sizeof(RavenPCIState),
     .class_init = raven_class_init,
     .interfaces = (const InterfaceInfo[]) {
         { INTERFACE_CONVENTIONAL_PCI_DEVICE },
-- 
2.51.0



  parent reply	other threads:[~2025-10-28  7:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  7:48 [PULL 00/23] Misc HW patches for 2025-10-28 Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 01/23] target/hppa: Set FPCR exception flag bits for non-trapped exceptions Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 02/23] qom: remove redundant typedef when use OBJECT_DECLARE_SIMPLE_TYPE Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 03/23] hw/net/virtio-net: make VirtIONet.vlans an array instead of a pointer Philippe Mathieu-Daudé
2025-12-09 12:15   ` Fiona Ebner
2025-12-09 20:07     ` Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 04/23] migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 05/23] hw/pci-host/raven: Simplify creating PCI facing part Philippe Mathieu-Daudé
2025-10-28  7:48 ` Philippe Mathieu-Daudé [this message]
2025-10-28  7:48 ` [PULL 07/23] hw/pci-host/raven: Simplify host bridge type declaration Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 08/23] hw/pci-host/raven: Use DEFINE_TYPES macro Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 09/23] hw/pci-host/raven: Simplify PCI bus creation Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 10/23] hw/qdev: Have qdev_get_gpio_out_connector() take const DeviceState arg Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 11/23] hw/sysbus: Have various helpers take a const SysBusDevice argument Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 12/23] hw/uefi: Include missing 'system/memory.h' header Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 13/23] hw/int/loongarch: " Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 14/23] hw/core/loader: Use qemu_open() instead of open() in get_image_size() Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 15/23] hw/core/loader: capture Error from load_image_targphys Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 16/23] hw/core/loader: improve error handling in image loading functions Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 17/23] hw/core/loader: add check for zero size in load_image_targphys_as Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 18/23] hw/core/loader: Pass errp to load_image_targphys_as() Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 19/23] hw/ppc: Pass error_fatal to load_image_targphys() Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 20/23] nw/nvram/ds1225y: Fix nvram MemoryRegion owner Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 21/23] hw/i386/intel_iommu: Remove an unused state field Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 22/23] hw/riscv: Use generic hwaddr for firmware addresses Philippe Mathieu-Daudé
2025-10-28  7:48 ` [PULL 23/23] hw/riscv: Widen OpenSBI dynamic info struct Philippe Mathieu-Daudé
2025-10-28 12:12 ` [PULL 00/23] Misc HW patches for 2025-10-28 Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251028074901.22062-7-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=hpoussin@reactos.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).