Message ID | 20250501183628.87479-11-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | hw/i386/pc: Remove deprecated 2.6 and 2.7 PC machines | expand |
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.
On 01/05/2025 20.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(-) Reviewed-by: Thomas Huth <thuth@redhat.com>
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)
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(-)