diff mbox

[04/11] sb16: fix migration quirk

Message ID 1300839376-22520-5-git-send-email-aliguori@us.ibm.com
State New
Headers show

Commit Message

Anthony Liguori March 23, 2011, 12:16 a.m. UTC
We seem to migrate the same field twice.  It's been this way since Fabrice
committed the original file.  Since semantically, we basically ignore the first
value, make this an unused entry.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 hw/sb16.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Juan Quintela March 23, 2011, 9:51 a.m. UTC | #1
Anthony Liguori <aliguori@us.ibm.com> wrote:
> We seem to migrate the same field twice.  It's been this way since Fabrice
> committed the original file.  Since semantically, we basically ignore the first
> value, make this an unused entry.
>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
>  hw/sb16.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/hw/sb16.c b/hw/sb16.c
> index c98546a..1c30e4c 100644
> --- a/hw/sb16.c
> +++ b/hw/sb16.c
> @@ -77,6 +77,7 @@ typedef struct SB16State {
>  
>      int v2x6;
>  
> +    uint8_t csp_param_dummy;
>      uint8_t csp_param;
>      uint8_t csp_value;
>      uint8_t csp_mode;
> @@ -1313,7 +1314,7 @@ static const VMStateDescription vmstate_sb16 = {
>          VMSTATE_INT32(can_write, SB16State),
>          VMSTATE_INT32(v2x6, SB16State),
>  
> -        VMSTATE_UINT8(csp_param, SB16State),
> +        VMSTATE_UINT8(csp_param_dummy, SB16State),
>          VMSTATE_UINT8(csp_value, SB16State),
>          VMSTATE_UINT8(csp_mode, SB16State),
>          VMSTATE_UINT8(csp_param, SB16State),

VMSTATE_UNUSED(1) instead?

Later, Juan.
Anthony Liguori March 23, 2011, 12:16 p.m. UTC | #2
On 03/23/2011 04:51 AM, Juan Quintela wrote:
> Anthony Liguori<aliguori@us.ibm.com>  wrote:
>> We seem to migrate the same field twice.  It's been this way since Fabrice
>> committed the original file.  Since semantically, we basically ignore the first
>> value, make this an unused entry.
>>
>> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>> ---
>>   hw/sb16.c |    3 ++-
>>   1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/sb16.c b/hw/sb16.c
>> index c98546a..1c30e4c 100644
>> --- a/hw/sb16.c
>> +++ b/hw/sb16.c
>> @@ -77,6 +77,7 @@ typedef struct SB16State {
>>
>>       int v2x6;
>>
>> +    uint8_t csp_param_dummy;
>>       uint8_t csp_param;
>>       uint8_t csp_value;
>>       uint8_t csp_mode;
>> @@ -1313,7 +1314,7 @@ static const VMStateDescription vmstate_sb16 = {
>>           VMSTATE_INT32(can_write, SB16State),
>>           VMSTATE_INT32(v2x6, SB16State),
>>
>> -        VMSTATE_UINT8(csp_param, SB16State),
>> +        VMSTATE_UINT8(csp_param_dummy, SB16State),
>>           VMSTATE_UINT8(csp_value, SB16State),
>>           VMSTATE_UINT8(csp_mode, SB16State),
>>           VMSTATE_UINT8(csp_param, SB16State),
> VMSTATE_UNUSED(1) instead?

Ack.  I forgot to update this patch to do that.

Regards,

Anthony Liguori

> Later, Juan.
>
diff mbox

Patch

diff --git a/hw/sb16.c b/hw/sb16.c
index c98546a..1c30e4c 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -77,6 +77,7 @@  typedef struct SB16State {
 
     int v2x6;
 
+    uint8_t csp_param_dummy;
     uint8_t csp_param;
     uint8_t csp_value;
     uint8_t csp_mode;
@@ -1313,7 +1314,7 @@  static const VMStateDescription vmstate_sb16 = {
         VMSTATE_INT32(can_write, SB16State),
         VMSTATE_INT32(v2x6, SB16State),
 
-        VMSTATE_UINT8(csp_param, SB16State),
+        VMSTATE_UINT8(csp_param_dummy, SB16State),
         VMSTATE_UINT8(csp_value, SB16State),
         VMSTATE_UINT8(csp_mode, SB16State),
         VMSTATE_UINT8(csp_param, SB16State),