qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 10/16] hw/audio/pcspk: Remove PCSpkState::migrate field


From: Mark Cave-Ayland
Subject: Re: [PATCH v2 10/16] hw/audio/pcspk: Remove PCSpkState::migrate field
Date: Fri, 2 May 2025 10:21:36 +0100
User-agent: Mozilla Thunderbird

On 01/05/2025 19:36, Philippe Mathieu-Daudé wrote:

The PCSpkState::migrate boolean was only set in the
pc_compat_2_7[] array, via the 'migrate=off' property.
We removed all machines using that array, lets remove
that property, simplifying vmstate_spk[].

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/audio/pcspk.c | 10 ----------
  1 file changed, 10 deletions(-)

diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index a419161b5b1..0e83ba0bf73 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -56,7 +56,6 @@ struct PCSpkState {
      unsigned int play_pos;
      uint8_t data_on;
      uint8_t dummy_refresh_clock;
-    bool migrate;
  };
static const char *s_spk = "pcspk";
@@ -196,18 +195,10 @@ static void pcspk_realizefn(DeviceState *dev, Error 
**errp)
      pcspk_state = s;
  }
-static bool migrate_needed(void *opaque)
-{
-    PCSpkState *s = opaque;
-
-    return s->migrate;
-}
-
  static const VMStateDescription vmstate_spk = {
      .name = "pcspk",
      .version_id = 1,
      .minimum_version_id = 1,
-    .needed = migrate_needed,
      .fields = (const VMStateField[]) {
          VMSTATE_UINT8(data_on, PCSpkState),
          VMSTATE_UINT8(dummy_refresh_clock, PCSpkState),
@@ -218,7 +209,6 @@ static const VMStateDescription vmstate_spk = {
  static const Property pcspk_properties[] = {
      DEFINE_AUDIO_PROPERTIES(PCSpkState, card),
      DEFINE_PROP_UINT32("iobase", PCSpkState, iobase,  0x61),
-    DEFINE_PROP_BOOL("migrate", PCSpkState, migrate,  true),
  };
static void pcspk_class_initfn(ObjectClass *klass, const void *data)

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>


ATB,

Mark.




reply via email to

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