[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
- [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR, Marc-André Lureau, 2019/11/20
- [PATCH v4 01/37] qdev: remove unused qdev_prop_int64, Marc-André Lureau, 2019/11/20
- [PATCH v4 02/37] sysbus: remove unused sysbus_try_create*, Marc-André Lureau, 2019/11/20
- [PATCH v4 03/37] sysbus: remove outdated comment, Marc-André Lureau, 2019/11/20
- [PATCH v4 04/37] chardev: generate an internal id when none given, Marc-André Lureau, 2019/11/20
- [PATCH v4 06/37] serial: initial qom-ification, Marc-André Lureau, 2019/11/20
- [PATCH v4 07/37] serial: register vmsd with DeviceClass, Marc-André Lureau, 2019/11/20
- [PATCH v4 05/37] serial-pci-multi: factor out multi_serial_get_port_count(), Marc-André Lureau, 2019/11/20
- [PATCH v4 08/37] serial: add "chardev" property, Marc-André Lureau, 2019/11/20
- [PATCH v4 09/37] serial: add "baudbase" property, Marc-André Lureau, 2019/11/20
- [PATCH v4 10/37] serial: realize the serial device, Marc-André Lureau, 2019/11/20
- [PATCH v4 11/37] serial: replace serial_exit_core() with unrealize, Marc-André Lureau, 2019/11/20
- [PATCH v4 12/37] serial: start making SerialMM a sysbus device, Marc-André Lureau, 2019/11/20