Skip to contentSkip to conversation

hw/audio/sb16: Do not migrate qdev properties

PATCH In review Philippe Mathieu-Daudé 4 participants 7 messages Nov 24, 2023 – Jan 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/audio/sb16: Do not migrate qdev properties

Since commit f7b4f61f63 ("qdev/isa: convert soundblaster") these fields has been converted to qdev properties, so don't need to be migrated:

  static Property sb16_properties[] = {
      DEFINE_AUDIO_PROPERTIES(SB16State, card),
      DEFINE_PROP_UINT32 ("version", SB16State, ver,  0x0405), /* 4.5 */
      DEFINE_PROP_UINT32 ("iobase",  SB16State, port, 0x220),
      DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
      DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
      DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
      DEFINE_PROP_END_OF_LIST (),

};

---
 hw/audio/sb16.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
hw/audio/sb16.c +5 -5
index 18f6d252db..be614d7bc3 100644
@@ -1325,11 +1325,11 @@ static const VMStateDescription vmstate_sb16 = {
     .minimum_version_id = 1,
     .post_load = sb16_post_load,
     .fields = (VMStateField[]) {
-        VMSTATE_UINT32 (irq, SB16State),
-        VMSTATE_UINT32 (dma, SB16State),
-        VMSTATE_UINT32 (hdma, SB16State),
-        VMSTATE_UINT32 (port, SB16State),
-        VMSTATE_UINT32 (ver, SB16State),
+        VMSTATE_UNUSED(  4 /* irq */
+                       + 4 /* dma */
+                       + 4 /* hdma */
+                       + 4 /* port */
+                       + 4 /* ver */),
         VMSTATE_INT32 (in_index, SB16State),
         VMSTATE_INT32 (out_data_len, SB16State),
         VMSTATE_INT32 (fmt_stereo, SB16State),
Signature · 1 line
2.41.0
#1 lore raw

ping?

Quoted 40 lines · Philippe Mathieu-Daudé

Since commit f7b4f61f63 ("qdev/isa: convert soundblaster") these fields has been converted to qdev properties, so don't need to be migrated:

   static Property sb16_properties[] = {
       DEFINE_AUDIO_PROPERTIES(SB16State, card),
       DEFINE_PROP_UINT32 ("version", SB16State, ver,  0x0405), /* 4.5 */
       DEFINE_PROP_UINT32 ("iobase",  SB16State, port, 0x220),
       DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
       DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
       DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
       DEFINE_PROP_END_OF_LIST (),
   };
---
  hw/audio/sb16.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
hw/audio/sb16.c +5 -5
index 18f6d252db..be614d7bc3 100644
@@ -1325,11 +1325,11 @@ static const VMStateDescription vmstate_sb16 = {
      .minimum_version_id = 1,
      .post_load = sb16_post_load,
      .fields = (VMStateField[]) {
-        VMSTATE_UINT32 (irq, SB16State),
-        VMSTATE_UINT32 (dma, SB16State),
-        VMSTATE_UINT32 (hdma, SB16State),
-        VMSTATE_UINT32 (port, SB16State),
-        VMSTATE_UINT32 (ver, SB16State),
+        VMSTATE_UNUSED(  4 /* irq */
+                       + 4 /* dma */
+                       + 4 /* hdma */
+                       + 4 /* port */
+                       + 4 /* ver */),
          VMSTATE_INT32 (in_index, SB16State),
          VMSTATE_INT32 (out_data_len, SB16State),
          VMSTATE_INT32 (fmt_stereo, SB16State),
#2 lore raw
Quoted 5 lines · Philippe Mathieu-Daudé

ping?

Quoted 2 lines · Philippe Mathieu-Daudé

Since commit f7b4f61f63 ("qdev/isa: convert soundblaster") these fields has been converted to qdev properties, so don't need to be

Typo: fields have been

Quoted 41 lines
Quoted 38 lines

migrated:

   static Property sb16_properties[] = {
       DEFINE_AUDIO_PROPERTIES(SB16State, card),
       DEFINE_PROP_UINT32 ("version", SB16State, ver,  0x0405), /* 4.5 */
       DEFINE_PROP_UINT32 ("iobase",  SB16State, port, 0x220),
       DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
       DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
       DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
       DEFINE_PROP_END_OF_LIST (),
   };
---
  hw/audio/sb16.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
hw/audio/sb16.c +5 -5
index 18f6d252db..be614d7bc3 100644
@@ -1325,11 +1325,11 @@ static const VMStateDescription vmstate_sb16 = {
      .minimum_version_id = 1,
      .post_load = sb16_post_load,
      .fields = (VMStateField[]) {
-        VMSTATE_UINT32 (irq, SB16State),
-        VMSTATE_UINT32 (dma, SB16State),
-        VMSTATE_UINT32 (hdma, SB16State),
-        VMSTATE_UINT32 (port, SB16State),
-        VMSTATE_UINT32 (ver, SB16State),
+        VMSTATE_UNUSED(  4 /* irq */
+                       + 4 /* dma */
+                       + 4 /* hdma */
+                       + 4 /* port */
+                       + 4 /* ver */),
          VMSTATE_INT32 (in_index, SB16State),
          VMSTATE_INT32 (out_data_len, SB16State),
          VMSTATE_INT32 (fmt_stereo, SB16State),
#3 lore raw
In reply to Philippe Mathieu-Daudé

If there are no objections I'll queue this patch (fixing the typo reported by Zoltan).

Quoted 40 lines · Philippe Mathieu-Daudé

Since commit f7b4f61f63 ("qdev/isa: convert soundblaster") these fields has been converted to qdev properties, so don't need to be migrated:

   static Property sb16_properties[] = {
       DEFINE_AUDIO_PROPERTIES(SB16State, card),
       DEFINE_PROP_UINT32 ("version", SB16State, ver,  0x0405), /* 4.5 */
       DEFINE_PROP_UINT32 ("iobase",  SB16State, port, 0x220),
       DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
       DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
       DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
       DEFINE_PROP_END_OF_LIST (),
   };
---
  hw/audio/sb16.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
hw/audio/sb16.c +5 -5
index 18f6d252db..be614d7bc3 100644
@@ -1325,11 +1325,11 @@ static const VMStateDescription vmstate_sb16 = {
      .minimum_version_id = 1,
      .post_load = sb16_post_load,
      .fields = (VMStateField[]) {
-        VMSTATE_UINT32 (irq, SB16State),
-        VMSTATE_UINT32 (dma, SB16State),
-        VMSTATE_UINT32 (hdma, SB16State),
-        VMSTATE_UINT32 (port, SB16State),
-        VMSTATE_UINT32 (ver, SB16State),
+        VMSTATE_UNUSED(  4 /* irq */
+                       + 4 /* dma */
+                       + 4 /* hdma */
+                       + 4 /* port */
+                       + 4 /* ver */),
          VMSTATE_INT32 (in_index, SB16State),
          VMSTATE_INT32 (out_data_len, SB16State),
          VMSTATE_INT32 (fmt_stereo, SB16State),
Reviewed-by
#4 lore raw
Quoted 36 lines · Philippe Mathieu-Daudé

If there are no objections I'll queue this patch (fixing the typo reported by Zoltan).

Quoted 32 lines · Philippe Mathieu-Daudé

Since commit f7b4f61f63 ("qdev/isa: convert soundblaster") these fields has been converted to qdev properties, so don't need to be migrated:

   static Property sb16_properties[] = {
       DEFINE_AUDIO_PROPERTIES(SB16State, card),
       DEFINE_PROP_UINT32 ("version", SB16State, ver,  0x0405), /* 4.5 */
       DEFINE_PROP_UINT32 ("iobase",  SB16State, port, 0x220),
       DEFINE_PROP_UINT32 ("irq",     SB16State, irq,  5),
       DEFINE_PROP_UINT32 ("dma",     SB16State, dma,  1),
       DEFINE_PROP_UINT32 ("dma16",   SB16State, hdma, 5),
       DEFINE_PROP_END_OF_LIST (),
   };
---
  hw/audio/sb16.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
hw/audio/sb16.c +0 -5
index 18f6d252db..be614d7bc3 100644
@@ -1325,11 +1325,11 @@ static const VMStateDescription vmstate_sb16 = {
      .minimum_version_id = 1,
      .post_load = sb16_post_load,
      .fields = (VMStateField[]) {
-        VMSTATE_UINT32 (irq, SB16State),
-        VMSTATE_UINT32 (dma, SB16State),
-        VMSTATE_UINT32 (hdma, SB16State),
-        VMSTATE_UINT32 (port, SB16State),
-        VMSTATE_UINT32 (ver, SB16State),
Quoted 8 lines

hw/audio/sb16.c static const VMStateDescription vmstate_sb16 = { · line 1335

Quoted 8 lines
hw/audio/sb16.c +5 -0
+        VMSTATE_UNUSED(  4 /* irq */
+                       + 4 /* dma */
+                       + 4 /* hdma */
+                       + 4 /* port */
+                       + 4 /* ver */),
          VMSTATE_INT32 (in_index, SB16State),
          VMSTATE_INT32 (out_data_len, SB16State),
          VMSTATE_INT32 (fmt_stereo, SB16State),

LGTM

#5 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 2 lines · Philippe Mathieu-Daudé

If there are no objections I'll queue this patch (fixing the typo reported by Zoltan).

Yes feel free to. Thanks,

Signature · 1 line
Peter Xu
#6 lore raw
Quoted 5 lines · Peter Xu
Quoted 2 lines · Philippe Mathieu-Daudé

If there are no objections I'll queue this patch (fixing the typo reported by Zoltan).

Yes feel free to. Thanks,

Thanks, merged as commit fa293f8125.