[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: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] audio: use existing macros istead of hardcoded strings |
Date: |
Wed, 17 Oct 2018 13:55:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Peter Maydell <address@hidden> wrote:
> 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.
Yeap, I agree.
Later, Juan.
- [Qemu-devel] [PATCH 2/4] audio: use TYPE_WM8750 instead of a hardcoded string, (continued)