[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 38/45] net: milkymist_minimac2: convert SysBus init
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PULL 38/45] net: milkymist_minimac2: convert SysBus init method to a realize method |
Date: |
Tue, 23 Oct 2018 16:24:49 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Oct 18, 2018 at 05:04:15PM -0300, Eduardo Habkost wrote:
> From: Cédric Le Goater <address@hidden>
>
> Cc: Michael Walle <address@hidden>
> Signed-off-by: Cédric Le Goater <address@hidden>
> Reviewed-by: Peter Maydell <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Message-Id: <address@hidden>
> Acked-by: Michael Walle <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/net/milkymist-minimac2.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
> index 3eaa19dfde..7ef1daee41 100644
> --- a/hw/net/milkymist-minimac2.c
> +++ b/hw/net/milkymist-minimac2.c
> @@ -452,9 +452,9 @@ static NetClientInfo net_milkymist_minimac2_info = {
> .receive = minimac2_rx,
> };
>
> -static int milkymist_minimac2_init(SysBusDevice *sbd)
> +static void milkymist_minimac2_realize(DeviceState *dev, Error **errp)
> {
> - DeviceState *dev = DEVICE(sbd);
> + SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
> MilkymistMinimac2State *s = MILKYMIST_MINIMAC2(dev);
> size_t buffers_size = TARGET_PAGE_ALIGN(3 * MINIMAC2_BUFFER_SIZE);
>
> @@ -479,8 +479,6 @@ static int milkymist_minimac2_init(SysBusDevice *sbd)
> s->nic = qemu_new_nic(&net_milkymist_minimac2_info, &s->conf,
> object_get_typename(OBJECT(dev)), dev->id, s);
> qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a);
> -
> - return 0;
> }
>
> static const VMStateDescription vmstate_milkymist_minimac2_mdio = {
> @@ -521,9 +519,8 @@ static Property milkymist_minimac2_properties[] = {
> static void milkymist_minimac2_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
> - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> - k->init = milkymist_minimac2_init;
> + dc->realize = milkymist_minimac2_realize;
> dc->reset = milkymist_minimac2_reset;
> dc->vmsd = &vmstate_milkymist_minimac2;
> dc->props = milkymist_minimac2_properties;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PULL 32/45] memory-device: complete factoring out unplug handling, (continued)
- [Qemu-ppc] [PULL 32/45] memory-device: complete factoring out unplug handling, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 33/45] memory-device: trace when pre_plugging/plugging/unplugging, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 34/45] net: etraxfs_eth: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 35/45] net: etraxfs_eth: add a reset method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 37/45] net: lance: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 36/45] net: lan9118: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 38/45] net: milkymist_minimac2: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- Re: [Qemu-ppc] [PULL 38/45] net: milkymist_minimac2: convert SysBus init method to a realize method,
David Gibson <=
- [Qemu-ppc] [PULL 39/45] net: mipsnet: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 40/45] net: opencores_eth: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 41/45] net: smc91c111: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 42/45] net: stellaris_enet: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 43/45] net: stellaris_enet: add a reset method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 44/45] net: xgmac: convert SysBus init method to a realize method, Eduardo Habkost, 2018/10/18