[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 20/22] xen_backend: Convert sysbus init function
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 20/22] xen_backend: Convert sysbus init function to realize function |
Date: |
Tue, 20 Nov 2018 14:49:49 +0000 |
On 19 November 2018 at 12:08, Mao Zhongyi
<address@hidden> wrote:
> Use DeviceClass rather than SysBusDeviceClass in
> xen_sysdev_class_init().
>
> Cc: address@hidden
> Cc: address@hidden
> Cc: address@hidden
>
> Signed-off-by: Mao Zhongyi <address@hidden>
> Signed-off-by: Zhang Shengju <address@hidden>
> ---
> hw/xen/xen_backend.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c
> index 9a8e8771ec..73b0ed0169 100644
> --- a/hw/xen/xen_backend.c
> +++ b/hw/xen/xen_backend.c
> @@ -809,9 +809,8 @@ static const TypeInfo xensysbus_info = {
> }
> };
>
> -static int xen_sysdev_init(SysBusDevice *dev)
> +static void xen_sysdev_realize(DeviceState *dev, Error **errp)
> {
> - return 0;
> }
>
> static Property xen_sysdev_properties[] = {
> @@ -821,9 +820,8 @@ static Property xen_sysdev_properties[] = {
> static void xen_sysdev_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
> - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> - k->init = xen_sysdev_init;
> + dc->realize = xen_sysdev_realize;
> dc->props = xen_sysdev_properties;
> dc->bus_type = TYPE_XENSYSBUS;
> }
If the realize function doesn't do anything at all, can't
we just omit it ?
thanks
-- PMM
- [Qemu-devel] [PATCH 09/22] input/pl050: Convert sysbus init function to realize function, (continued)
- [Qemu-devel] [PATCH 09/22] input/pl050: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 04/22] core/empty_slot: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 12/22] milkymist-pfpu: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 11/22] milkymist-hpdmc: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 15/22] pci-bridge/dec: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 20/22] xen_backend: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- Re: [Qemu-devel] [PATCH 20/22] xen_backend: Convert sysbus init function to realize function,
Peter Maydell <=
- [Qemu-devel] [PATCH 14/22] nvram/ds1225y: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 21/22] event-facility: Change SysBusDeviceClass *sbdc to SysBusDeviceClass *sbc, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 10/22] intc/puv3_intc: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19
- [Qemu-devel] [PATCH 01/22] musicpal: Convert sysbus init function to realize function, Mao Zhongyi, 2018/11/19