From: Michael Walle <michael@walle.cc>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: "Jason Wang" <jasowang@redhat.com>,
qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH v2 05/11] net: milkymist_minimac2: convert SysBus init method to a realize method
Date: Mon, 01 Oct 2018 09:46:26 +0200 [thread overview]
Message-ID: <d662a20d3088d55f4b2a98e247258ac1@walle.cc> (raw)
In-Reply-To: <20181001063803.22330-6-clg@kaod.org>
Am 2018-10-01 08:37, schrieb Cédric Le Goater:
> Cc: Michael Walle <michael@walle.cc>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> 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 3eaa19dfde92..7ef1daee41ec 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;
Acked-by: Michael Walle <michael@walle.cc>
-michael
next prev parent reply other threads:[~2018-10-01 7:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 6:37 [Qemu-devel] [PATCH v2 00/11] net: convert SysBus init method to a realize method Cédric Le Goater
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 01/11] net: etraxfs_eth: " Cédric Le Goater
2018-10-01 7:57 ` Philippe Mathieu-Daudé
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 02/11] net: etraxfs_eth: add a reset method Cédric Le Goater
2018-10-01 8:00 ` Philippe Mathieu-Daudé
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 03/11] net: lan9118: convert SysBus init method to a realize method Cédric Le Goater
2018-10-01 8:01 ` Philippe Mathieu-Daudé
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 04/11] net: lance: " Cédric Le Goater
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 05/11] net: milkymist_minimac2: " Cédric Le Goater
2018-10-01 7:46 ` Michael Walle [this message]
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 06/11] net: mipsnet: " Cédric Le Goater
2018-10-01 6:37 ` [Qemu-devel] [PATCH v2 07/11] net: opencores_eth: " Cédric Le Goater
2018-10-01 7:51 ` Max Filippov
2018-10-01 6:38 ` [Qemu-devel] [PATCH v2 08/11] net: smc91c111: " Cédric Le Goater
2018-10-01 8:01 ` Philippe Mathieu-Daudé
2018-10-01 6:38 ` [Qemu-devel] [PATCH v2 09/11] net: stellaris_enet: " Cédric Le Goater
2018-10-01 6:38 ` [Qemu-devel] [PATCH v2 10/11] net: stellaris_enet: add a reset method Cédric Le Goater
2018-10-01 6:38 ` [Qemu-devel] [PATCH v2 11/11] net: xgmac: convert SysBus init method to a realize method Cédric Le Goater
2018-10-10 13:30 ` [Qemu-devel] [PATCH v2 00/11] net: " Philippe Mathieu-Daudé
2018-10-11 17:47 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d662a20d3088d55f4b2a98e247258ac1@walle.cc \
--to=michael@walle.cc \
--cc=clg@kaod.org \
--cc=f4bug@amsat.org \
--cc=jasowang@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).