On Wed, 20 Nov 2019 at 15:25, Marc-André Lureau <marcandre.lur...@redhat.com> wrote: > > Make SerialState a device (the following patches will introduce IO/MM > sysbus serial devices) > > None of the serial_{,mm}_init() callers actually free the returned > value (even if they did, it would be quite harmless), so we can change > the object allocation at will. > > However, the devices that embed SerialState must now have their field > QOM-initialized manually (isa, pci, pci-multi). > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> +static void serial_class_init(ObjectClass *klass, void *data) > +{ > + DeviceClass *dc = DEVICE_CLASS(klass); > + > + dc->user_creatable = false; The comment describing user_creatable in qdev-core.h says: * It should never be cleared without a comment explaining why it * is cleared. So we should have a comment here. Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM