qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <mlureau@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel@nongnu.org, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH 06/22] char: add a /chardevs container
Date: Tue, 7 Feb 2017 15:03:55 -0500 (EST)	[thread overview]
Message-ID: <1174725609.1298917.1486497835239.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <3ce84650-5d49-4db3-b71a-b71a37c0bd98@redhat.com>

Hi

----- Original Message -----
> 
> 
> On 02/02/2017 15:51, Marc-André Lureau wrote:
> > +    if (QTAILQ_IN_USE(chr, next)) {
> > +        QTAILQ_REMOVE(&chardevs, chr, next);
> > +    }
> > +    if (OBJECT(chr)->parent) {
> > +        object_unparent(OBJECT(chr));
> > +    } else {
> > +        object_unref(OBJECT(chr));
> > +    }
> 
> What's the case where the "else" is used?  Probably qemu_chr_delete
> callers should be changed to use object_unparent or object_unref directly.

I thought about that, but calling object_unparent() seems weird, since callers aren't much aware of the fact that chardev are added or not to a container (useless distinction imho). I wish the last object_unref() would automatically unparent, if the object has a parent. Would that be acceptable?

  reply	other threads:[~2017-02-07 20:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 14:51 [Qemu-devel] [PATCH 00/22] chardev clean-ups & tests Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 01/22] char: remove qemu_chr_be_generic_open Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 02/22] mux: simplfy muxes_realize_done Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 03/22] xen: use a better chardev type check Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 04/22] container: don't leak container reference Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 05/22] main: free root container Marc-André Lureau
2017-02-06  9:03   ` Paolo Bonzini
2017-02-07 20:01     ` Marc-André Lureau
2017-02-09 17:09       ` Paolo Bonzini
2017-02-02 14:51 ` [Qemu-devel] [PATCH 06/22] char: add a /chardevs container Marc-André Lureau
2017-02-06  9:05   ` Paolo Bonzini
2017-02-07 20:03     ` Marc-André Lureau [this message]
2017-02-09 17:16       ` Paolo Bonzini
2017-02-10 12:14         ` Marc-André Lureau
2017-02-10 12:26           ` Paolo Bonzini
2017-02-10 12:59             ` Marc-André Lureau
2017-02-10 13:12               ` Paolo Bonzini
2017-02-02 14:51 ` [Qemu-devel] [PATCH 07/22] char: use /chardevs container instead of chardevs list Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 08/22] char: remove qemu_chardev_add Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 09/22] char: remove chardevs list Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 10/22] char: useless NULL check Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 11/22] qcow2: remove " Marc-André Lureau
2017-02-06  9:06   ` Paolo Bonzini
2017-02-02 14:51 ` [Qemu-devel] [PATCH 12/22] char-socket: introduce update_disconnected_filename() Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 13/22] char-socket: update local address after listen Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 14/22] char-socket: add 'addr' property Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 15/22] char-socket: add 'connected' property Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 16/22] char-udp: flush as much buffer as possible Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 17/22] tests: add alias check in /char/ringbuf Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 18/22] tests: add /char/pipe test Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 19/22] tests: add /char/file test Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 20/22] tests: add /char/socket test Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 21/22] tests: add /char/udp test Marc-André Lureau
2017-02-02 14:51 ` [Qemu-devel] [PATCH 22/22] tests: add /char/console test Marc-André Lureau

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=1174725609.1298917.1486497835239.JavaMail.zimbra@redhat.com \
    --to=mlureau@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.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).