From: Thomas Huth <thuth@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>,
"Jason Wang" <jasowang@redhat.com>,
qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [Qemu-devel] [PATCH 04/11] net: lance: convert SysBus init method to a realize method
Date: Thu, 4 Oct 2018 15:30:32 +0200 [thread overview]
Message-ID: <863c5fa6-0122-b470-ea6d-f86c6f3fe0d8@redhat.com> (raw)
In-Reply-To: <20180928135003.8650-5-clg@kaod.org>
On 2018-09-28 15:49, Cédric Le Goater wrote:
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
> hw/net/lance.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/net/lance.c b/hw/net/lance.c
> index a08d5ac6a848..f987b2fd180f 100644
> --- a/hw/net/lance.c
> +++ b/hw/net/lance.c
> @@ -97,9 +97,9 @@ static const VMStateDescription vmstate_lance = {
> }
> };
>
> -static int lance_init(SysBusDevice *sbd)
> +static void lance_realize(DeviceState *dev, Error **errp)
> {
> - DeviceState *dev = DEVICE(sbd);
> + SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
> SysBusPCNetState *d = SYSBUS_PCNET(dev);
> PCNetState *s = &d->state;
>
> @@ -115,7 +115,6 @@ static int lance_init(SysBusDevice *sbd)
> s->phys_mem_read = ledma_memory_read;
> s->phys_mem_write = ledma_memory_write;
> pcnet_common_init(dev, s, &net_lance_info);
> - return 0;
> }
>
> static void lance_reset(DeviceState *dev)
> @@ -144,9 +143,8 @@ static Property lance_properties[] = {
> static void lance_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
> - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> - k->init = lance_init;
> + dc->realize = lance_realize;
> set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
> dc->fw_name = "ethernet";
> dc->reset = lance_reset;
>
Tested-by: Thomas Huth <thuth@redhat.com>
next parent reply other threads:[~2018-10-04 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180928135003.8650-1-clg@kaod.org>
[not found] ` <20180928135003.8650-5-clg@kaod.org>
2018-10-04 13:30 ` Thomas Huth [this message]
2018-10-10 11:57 ` [Qemu-devel] [PATCH 00/11] net: convert SysBus init method to a realize method Cédric Le Goater
2018-10-10 11:58 ` Cédric Le Goater
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=863c5fa6-0122-b470-ea6d-f86c6f3fe0d8@redhat.com \
--to=thuth@redhat.com \
--cc=clg@kaod.org \
--cc=jasowang@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--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).