qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 06/37] serial: initial qom-ification


From: Peter Maydell
Subject: Re: [PATCH v4 06/37] serial: initial qom-ification
Date: Thu, 21 Nov 2019 13:39:27 +0000

On Wed, 20 Nov 2019 at 15:25, Marc-André Lureau
<address@hidden> 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 <address@hidden>

> +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 <address@hidden>

thanks
-- PMM



reply via email to

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