xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	"open list:X86" <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Zhang Shengju <zhangshengju@cmss.chinamobile.com>
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	[thread overview]
Message-ID: <CAFEAcA92SCAar143VMkJiLGEv0kUzMBXJySN8MEd7Ze9U_rBew@mail.gmail.com> (raw)
In-Reply-To: <20181119120820.29878-21-maozhongyi@cmss.chinamobile.com>

On 19 November 2018 at 12:08, Mao Zhongyi
<maozhongyi@cmss.chinamobile.com> wrote:
> Use DeviceClass rather than SysBusDeviceClass in
> xen_sysdev_class_init().
>
> Cc: sstabellini@kernel.org
> Cc: anthony.perard@citrix.com
> Cc: xen-devel@lists.xenproject.org
>
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> ---
>  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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      parent reply	other threads:[~2018-11-20 14:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181119120820.29878-1-maozhongyi@cmss.chinamobile.com>
2018-11-19 12:08 ` [PATCH 20/22] xen_backend: Convert sysbus init function to realize function Mao Zhongyi
2018-11-19 12:27 ` [PATCH 00/22] QOM'ify SysBusDeviceClass->init Cornelia Huck
     [not found] ` <20181119120820.29878-21-maozhongyi@cmss.chinamobile.com>
2018-11-20 14:49   ` Peter Maydell [this message]

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=CAFEAcA92SCAar143VMkJiLGEv0kUzMBXJySN8MEd7Ze9U_rBew@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=maozhongyi@cmss.chinamobile.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zhangshengju@cmss.chinamobile.com \
    /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).