On 11 October 2018 at 11:45, Philippe Mathieu-Daudé <phi...@redhat.com> wrote: > On 11/10/2018 11:00, Mao Zhongyi wrote: >> Cc: Jan Kiszka <jan.kis...@web.de> >> Cc: Peter Maydell <peter.mayd...@linaro.org> >> Cc: Gerd Hoffmann <kra...@redhat.com> >> To: qemu-...@nongnu.org >> >> Signed-off-by: Mao Zhongyi <maozhon...@cmss.chinamobile.com> >> --- >> 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