From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TumoF-0004sa-KL for qemu-devel@nongnu.org; Mon, 14 Jan 2013 11:22:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TumoE-0000th-Gl for qemu-devel@nongnu.org; Mon, 14 Jan 2013 11:22:51 -0500 Message-ID: <50F430D6.5030008@suse.de> Date: Mon, 14 Jan 2013 17:22:46 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1358121304-21345-1-git-send-email-afaerber@suse.de> <1358121304-21345-9-git-send-email-afaerber@suse.de> <87ehho2b9o.fsf@blackfin.pond.sub.org> In-Reply-To: <87ehho2b9o.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de Am 14.01.2013 13:34, schrieb Markus Armbruster: > Andreas F=C3=A4rber writes: >=20 >> It was not qdev'ified before, turn it into a SysBusDevice and >> initialize it via static properties. >> >> Prepare Old World specific MacIO state and embed the NVRAM state there= . >> >> Drop macio_nvram_setup_bar() in favor of sysbus_mmio_map() or >> direct use of Memory API. > [...] >> diff --git a/hw/macio.c b/hw/macio.c >> index 0e6fc8d..32f359c 100644 >> --- a/hw/macio.c >> +++ b/hw/macio.c > [...] >> @@ -85,11 +93,22 @@ static int macio_common_initfn(PCIDevice *d) >> static int macio_oldworld_initfn(PCIDevice *d) >> { >> MacIOState *s =3D MACIO(d); >> + OldWorldMacIOState *os =3D OLDWORLD_MACIO(d); >=20 > I find aliasing pointers like these mildly confusing, and prefer to > avoid aliases. Matter of taste, I guess. What would you propose instead? When accessing fields we are not supposed to use FOO(x)->bar so I don't see any alternative. (This notation was chosen I think because it is compatible with C++/ObjC/... when exchanging the cast macro.) Andreas >=20 >> + SysBusDevice *sysbus_dev; >> int ret =3D macio_common_initfn(d); >> if (ret < 0) { >> return ret; > [...] --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg