qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM
Date: Mon, 14 Jan 2013 17:22:46 +0100	[thread overview]
Message-ID: <50F430D6.5030008@suse.de> (raw)
In-Reply-To: <87ehho2b9o.fsf@blackfin.pond.sub.org>

Am 14.01.2013 13:34, schrieb Markus Armbruster:
> Andreas Färber <afaerber@suse.de> writes:
> 
>> 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 = MACIO(d);
>> +    OldWorldMacIOState *os = OLDWORLD_MACIO(d);
> 
> 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

> 
>> +    SysBusDevice *sysbus_dev;
>>      int ret = macio_common_initfn(d);
>>      if (ret < 0) {
>>          return ret;
> [...]

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

  reply	other threads:[~2013-01-14 16:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-13 23:54 [Qemu-devel] [RFC ppc-next v3 00/10] target-ppc: MacIO QOM'ification Andreas Färber
2013-01-13 23:54 ` [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const Andreas Färber
2013-01-14 12:19   ` Markus Armbruster
2013-01-14 16:52     ` Andreas Färber
2013-01-14 17:27       ` Markus Armbruster
2013-01-14 19:01       ` [Qemu-devel] Go along with glib's basic type typedef silliness? (was: [PATCH 01/10] qom: Make object_resolve_path_component() path argument const) Markus Armbruster
2013-01-17 20:26         ` Blue Swirl
2013-01-18 15:36           ` [Qemu-devel] Go along with glib's basic type typedef silliness? Markus Armbruster
2013-01-19  9:13             ` Blue Swirl
2013-01-13 23:54 ` [Qemu-devel] [RFC ppc-next v3 02/10] ppc: Move Mac machines to hw/ppc/ Andreas Färber
2013-01-13 23:54 ` [Qemu-devel] [RFC ppc-next v3 03/10] macio: QOM'ify some more Andreas Färber
2013-01-13 23:54 ` [Qemu-devel] [RFC ppc-next v3 04/10] macio: Delay qdev init until all fields are initialized Andreas Färber
2013-01-13 23:54 ` [Qemu-devel] [RFC ppc-next v3 05/10] macio: Split MacIO in two Andreas Färber
2013-01-13 23:55 ` [Qemu-devel] [RFC ppc-next v3 06/10] mac_nvram: Clean up public API Andreas Färber
2013-01-13 23:55 ` [Qemu-devel] [RFC ppc-next v3 07/10] mac_nvram: Mark as Big Endian Andreas Färber
2013-01-13 23:55 ` [Qemu-devel] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM Andreas Färber
2013-01-14 12:34   ` Markus Armbruster
2013-01-14 16:22     ` Andreas Färber [this message]
2013-01-14 17:30       ` Markus Armbruster
2013-01-13 23:55 ` [Qemu-devel] [RFC ppc-next v3 09/10] ide/macio: QOM'ify MacIO IDE Andreas Färber
2013-01-13 23:55 ` [Qemu-devel] [RFC ppc-next v3 10/10] cuda: QOM'ify CUDA Andreas Färber
2013-01-14 12:47 ` [Qemu-devel] [RFC ppc-next v3 00/10] target-ppc: MacIO QOM'ification Markus Armbruster
2013-01-14 21:56 ` [Qemu-devel] [Qemu-ppc] " Mark Cave-Ayland
2013-01-18 16:36   ` Andreas Färber

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=50F430D6.5030008@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 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).