All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH qom-next for-1.6 7/8] pl110: QOM'ify pl110, pl110_versatile and pl111
Date: Sat, 27 Jul 2013 20:25:23 +0200	[thread overview]
Message-ID: <51F41093.4010601@suse.de> (raw)
In-Reply-To: <51F26E4F.2040002@suse.de>

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Am 26.07.2013 14:40, schrieb Andreas Färber:
> Am 26.07.2013 04:58, schrieb Hu Tao:
>> Would it be better to explicitly set PL110 version? I know PL110 is 0,
>> but it's not like a normal variable which is always good to be
>> initialized to 0, assuming a version number is bad. (This is not a problem
>> of this patch)
> 
> Sure, I can add such a no-op line. Thanks for your watchful review!

Squashed the attached patch, that should address it.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

[-- Attachment #2: 00.diff --]
[-- Type: text/x-patch, Size: 1227 bytes --]

diff --git a/hw/display/pl110.c b/hw/display/pl110.c
index c774e46..58a8ff1 100644
--- a/hw/display/pl110.c
+++ b/hw/display/pl110.c
@@ -457,7 +457,7 @@ static const GraphicHwOps pl110_gfx_ops = {
     .gfx_update  = pl110_update_display,
 };
 
-static int pl110_init(SysBusDevice *sbd)
+static int pl110_initfn(SysBusDevice *sbd)
 {
     DeviceState *dev = DEVICE(sbd);
     PL110State *s = PL110(dev);
@@ -470,6 +470,13 @@ static int pl110_init(SysBusDevice *sbd)
     return 0;
 }
 
+static void pl110_init(Object *obj)
+{
+    PL110State *s = PL110(obj);
+
+    s->version = PL110;
+}
+
 static void pl110_versatile_init(Object *obj)
 {
     PL110State *s = PL110(obj);
@@ -489,7 +496,7 @@ static void pl110_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
-    k->init = pl110_init;
+    k->init = pl110_initfn;
     dc->no_user = 1;
     dc->vmsd = &vmstate_pl110;
 }
@@ -498,6 +505,7 @@ static const TypeInfo pl110_info = {
     .name          = TYPE_PL110,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(PL110State),
+    .instance_init = pl110_init,
     .class_init    = pl110_class_init,
 };
 

  reply	other threads:[~2013-07-27 18:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 23:16 [Qemu-devel] [PATCH qom-next for-1.6 0/8] display: QOM cast cleanups Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 1/8] exynos4210_fimd: QOM cast cleanup Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 2/8] g364fb: " Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 3/8] jazz_led: QOM cast cleanups Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 4/8] milkymist-tmu2: " Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 5/8] milkymist-vgafb: " Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 6/8] pl110: Rename pl110_state to PL110State Andreas Färber
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 7/8] pl110: QOM'ify pl110, pl110_versatile and pl111 Andreas Färber
2013-07-26  2:58   ` Hu Tao
2013-07-26 12:40     ` Andreas Färber
2013-07-27 18:25       ` Andreas Färber [this message]
2013-07-24 23:16 ` [Qemu-devel] [PATCH qom-next for-1.6 8/8] tcx: QOM cast cleanups Andreas Färber
2013-07-26  3:05 ` [Qemu-devel] [PATCH qom-next for-1.6 0/8] display: " Hu Tao

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=51F41093.4010601@suse.de \
    --to=afaerber@suse.de \
    --cc=hutao@cn.fujitsu.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.