qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"
Date: Thu, 13 Nov 2014 11:08:51 +0100	[thread overview]
Message-ID: <54648333.2050808@redhat.com> (raw)
In-Reply-To: <87wq6zmsiz.fsf@blackfin.pond.sub.org>



On 13/11/2014 09:08, Markus Armbruster wrote:
>> >
>> > I like the idea, but the API is just too ugly. :(  Unfortunately I have
>> > nothing better to propose.
> For what it's worth, three out of four uses already need to free,
> because they append "[*]" to an argument string.

Yes, your API works well for the cases it's replacing now.

> Can you explain what you mean by "avoid making all memory region names
> array-ified", and why my API won't be usable for that?

Basically removing the "[*]" from memory_region_init, and instead adding
it to all callers.  It can then be removed from those callers that do
not need array-ification, which is most of them.

But you would still need it in most non-qdevified devices.  In that
case, the parent of the MemoryRegions is just /machine; hence, just
having two serial ports gives you two same-named memory regions.  So
non-qdevified devices would require surgery to add
object_gen_new_property_name, and they exactly those that one doesn't
want to touch. :)

If everything were qdevified, I agree that object_gen_new_property_name
would be a fine API.

Paolo

  reply	other threads:[~2014-11-13 10:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 17:08 [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 1/4] qom: New object_gen_new_property_name() Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 2/4] memory: Use object_gen_new_property_name() instead of "arrayification" Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 3/4] qdev: " Markus Armbruster
2014-11-12 17:08 ` [Qemu-devel] [PATCH 4/4] Revert "qom: Add automatic arrayification to object_property_add()" Markus Armbruster
2014-11-12 17:14   ` Andreas Färber
2014-11-12 22:25     ` Paolo Bonzini
2014-11-12 22:47       ` Peter Maydell
2014-11-13 10:05         ` Paolo Bonzini
2014-11-13 10:50           ` Peter Maydell
2014-11-12 17:13 ` [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" Paolo Bonzini
2014-11-13  8:08   ` Markus Armbruster
2014-11-13 10:08     ` Paolo Bonzini [this message]
2014-11-13 14:34       ` Markus Armbruster
2014-11-13 14:39         ` Paolo Bonzini
2014-11-14 14:21           ` Markus Armbruster
2014-11-14 14:25             ` Paolo Bonzini
2014-11-14 15:10               ` Markus Armbruster

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=54648333.2050808@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=peter.crosthwaite@xilinx.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 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).