qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>, qemu-devel@nongnu.org
Cc: f4bug@amsat.org, alistair.francis@wdc.com, kraxel@redhat.com,
	pbonzini@redhat.com,
	Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Subject: Re: [Qemu-devel] [PATCH v2 05/21] display/g364fb: Convert sysbus init function to realize function
Date: Fri, 23 Nov 2018 16:43:23 +0100	[thread overview]
Message-ID: <cb7b4280-b717-47d3-8821-b24c977f5292@redhat.com> (raw)
In-Reply-To: <20181123153040.18933-6-maozhongyi@cmss.chinamobile.com>

On 23/11/18 16:30, Mao Zhongyi wrote:
> Use DeviceClass rather than SysBusDeviceClass in
> g364fb_sysbus_class_init().
> 
> Cc: pbonzini@redhat.com
> Cc: kraxel@redhat.com
> Cc: f4bug@amsat.org
> Cc: alistair.francis@wdc.com
> 
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/display/g364fb.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
> index 8ad7e5d824..3407adf98d 100644
> --- a/hw/display/g364fb.c
> +++ b/hw/display/g364fb.c
> @@ -489,18 +489,16 @@ typedef struct {
>      G364State g364;
>  } G364SysBusState;
>  
> -static int g364fb_sysbus_init(SysBusDevice *sbd)
> +static void g364fb_sysbus_realize(DeviceState *dev, Error **errp)
>  {
> -    DeviceState *dev = DEVICE(sbd);
>      G364SysBusState *sbs = G364(dev);
>      G364State *s = &sbs->g364;
> +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
>  
>      g364fb_init(dev, s);
>      sysbus_init_irq(sbd, &s->irq);
>      sysbus_init_mmio(sbd, &s->mem_ctrl);
>      sysbus_init_mmio(sbd, &s->mem_vram);
> -
> -    return 0;
>  }
>  
>  static void g364fb_sysbus_reset(DeviceState *d)
> @@ -518,9 +516,8 @@ static Property g364fb_sysbus_properties[] = {
>  static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
> -    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>  
> -    k->init = g364fb_sysbus_init;
> +    dc->realize = g364fb_sysbus_realize;
>      set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
>      dc->desc = "G364 framebuffer";
>      dc->reset = g364fb_sysbus_reset;
> 

  reply	other threads:[~2018-11-23 15:43 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 15:30 [Qemu-devel] [PATCH v2 00/21] QOM'ify SysBusDeviceClass->init Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 01/21] musicpal: Convert sysbus init function to realize function Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 02/21] block/noenand: " Mao Zhongyi
2018-11-23 16:31   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 03/21] char/grlib_apbuart: " Mao Zhongyi
2018-11-23 15:38   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 04/21] core/empty_slot: " Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 05/21] display/g364fb: " Mao Zhongyi
2018-11-23 15:43   ` Philippe Mathieu-Daudé [this message]
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 06/21] dma/puv3_dma: " Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 07/21] gpio/puv3_gpio: " Mao Zhongyi
2018-11-23 15:38   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 08/21] milkymist-softusb: " Mao Zhongyi
2018-11-23 15:39   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 09/21] input/pl050: " Mao Zhongyi
2018-11-23 15:40   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 10/21] intc/puv3_intc: " Mao Zhongyi
2018-11-23 15:44   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 11/21] milkymist-hpdmc: " Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 12/21] milkymist-pfpu: " Mao Zhongyi
2018-11-23 15:40   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 13/21] puv3_pm.c: " Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 14/21] nvram/ds1225y: " Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 15/21] pci-bridge/dec: " Mao Zhongyi
2018-11-23 16:37   ` Philippe Mathieu-Daudé
2018-11-25  1:36     ` [Qemu-devel] [PATCH v2 15/21] pci-bridge/dec: Convert sysbus initfunction " maozy
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 16/21] timer/etraxfs_timer: Convert sysbus init function " Mao Zhongyi
2018-11-23 16:32   ` Philippe Mathieu-Daudé
2018-11-23 16:33   ` Edgar E. Iglesias
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 17/21] timer/grlib_gptimer: " Mao Zhongyi
2018-11-23 15:41   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 18/21] timer/puv3_ost: " Mao Zhongyi
2018-11-23 16:33   ` Philippe Mathieu-Daudé
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 19/21] usb/tusb6010: " Mao Zhongyi
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 20/21] xen_backend: remove xen_sysdev_init() function Mao Zhongyi
2018-11-26 14:27   ` Anthony PERARD
2018-11-23 15:30 ` [Qemu-devel] [PATCH v2 21/21] core/sysbus: remove the SysBusDeviceClass::init path Mao Zhongyi

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=cb7b4280-b717-47d3-8821-b24c977f5292@redhat.com \
    --to=philmd@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=maozhongyi@cmss.chinamobile.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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).