qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] audio: use existing macros istead of hardco


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 4/4] audio: use existing macros istead of hardcoded strings
Date: Thu, 11 Oct 2018 12:05:41 +0100

On 11 October 2018 at 11:45, Philippe Mathieu-Daudé <address@hidden> wrote:
> On 11/10/2018 11:00, Mao Zhongyi wrote:
>> Cc: Jan Kiszka <address@hidden>
>> Cc: Peter Maydell <address@hidden>
>> Cc: Gerd Hoffmann <address@hidden>
>> To: address@hidden
>>
>> Signed-off-by: Mao Zhongyi <address@hidden>
>> ---
>>  hw/arm/musicpal.c          | 16 ++++++++--------
>>  hw/audio/marvell_88w8618.c |  3 +--
>>  include/hw/audio/wm8750.h  |  1 +
>>  3 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
>> index ac266f9253..6425f1d50f 100644
>> --- a/hw/arm/musicpal.c
>> +++ b/hw/arm/musicpal.c
>> @@ -406,7 +406,7 @@ static void mv88w8618_eth_realize(DeviceState *dev, 
>> Error **errp)
>>  }
>>
>>  static const VMStateDescription mv88w8618_eth_vmsd = {
>> -    .name = "mv88w8618_eth",
>> +    .name = TYPE_MV88W8618_ETH,
>
> I understand TYPE_device name might changed, but once used,
> VMStateDescription shouldn't, else this would break migration.
> Thus I wouldn't recommend using TYPE_name in VMStateDescription.name.
>
> Since I'm not sure I cc'ed the migration maintainers.

Yes, that's the usual approach -- the vmstate struct names
aren't inherently the same as the QOM type names, and so
we keep them decoupled to avoid accidentally breaking migration.

thanks
-- PMM



reply via email to

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