From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoyA9-0002dz-2T for qemu-devel@nongnu.org; Tue, 18 Jun 2013 11:49:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoyA7-0002we-Aq for qemu-devel@nongnu.org; Tue, 18 Jun 2013 11:49:41 -0400 Message-ID: <51C08191.7040509@suse.de> Date: Tue, 18 Jun 2013 17:49:37 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1371520688-24949-1-git-send-email-afaerber@suse.de> <1371520688-24949-3-git-send-email-afaerber@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] intc/openpic: Convert to QOM realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: scottwood@freescale.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de Hi, Am 18.06.2013 05:28, schrieb Peter Crosthwaite: > On Tue, Jun 18, 2013 at 11:58 AM, Andreas F=E4rber w= rote: >> Split qdev initfn into instance_init and realize functions. >> Change one occurrence of "klass" while at it. >> >> Signed-off-by: Andreas F=E4rber >=20 > Reviewed-by: Peter Crosthwaite >=20 >> --- >> hw/intc/openpic.c | 34 +++++++++++++++++++--------------- >> 1 file changed, 19 insertions(+), 15 deletions(-) >> >> diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c >> index 875c6b8..2d6b05c 100644 >> --- a/hw/intc/openpic.c >> +++ b/hw/intc/openpic.c >> @@ -1531,8 +1531,16 @@ static void map_list(OpenPICState *opp, const M= emReg *list, int *count) >> } >> } >> >> -static int openpic_init(SysBusDevice *dev) >> +static void openpic_init(Object *obj) >> { >> + OpenPICState *opp =3D OPENPIC(obj); >> + >> + memory_region_init(&opp->mem, "openpic", 0x40000); >> +} >> + >> +static void openpic_realize(DeviceState *dev, Error **errp) >> +{ >> + SysBusDevice *d =3D SYS_BUS_DEVICE(dev); >=20 > FWIW, i have been using "sbd" for this variable name in similar > conversions (sdhci, xilinx_spips, axidma, axienet and a few friends). > There are also a few other precedents out there such as arm_gic. So far we don't seem to have a consistent convention. I've seen busdev, sysbusdev, d; also pcidev vs. pci_dev vs. d for PCIDevice etc. sbd is fine with me, too. But since we're not yet consistent in using oc rather than klass either (including in your super class RFC), do you see a strong need to respin? Or can we just follow-up with a sed across the tree at some point once there is agreement on the naming? We should collect naming conventions into the QOMConventions Wiki page. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg