All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 4/4] qobject: modify qobject_ref() to assert on NULL and return obj
Date: Mon, 16 Apr 2018 10:26:13 +0200	[thread overview]
Message-ID: <87k1t7sgka.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20180413161842.5117-5-marcandre.lureau@redhat.com> ("Marc-André Lureau"'s message of "Fri, 13 Apr 2018 18:18:42 +0200")

Marc-André Lureau <marcandre.lureau@redhat.com> writes:

> Following a discussion on the mailing list:

If a reader of this commit message could profit from reading the
discussion, refer to it by URL and/or Message-Id.  If not, don't mention
it.

>                                             while it may be convenient
> to accept NULL value in qobject_unref() (for similar reasons as free()
> accepts NULL), it is a probably a bad idea to accept NULL argument in
> qobject_ref().

Yes?  What's the patch doing about it?  Peeking ahead: it outlaws it.
So say that.

> Furthermore,

Commit message smell: two things in one patch.  Worth separating them?

>              it is convenient and more clear to call qobject_ref() at
> the time when the reference is associated with a variable, or
> argument. For this reason, make qobject_ref() return the same pointer
> as given.

Not 100% clear whether the patch merely makes the "convenient and more
clear" way possible, or reality.  Peeking ahead: it's the latter.  So
say that.

How did you find the places to change?

Do you think you got them all?

> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

  reply	other threads:[~2018-04-16  8:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 16:18 [Qemu-devel] [PATCH v4 0/4] RFC: simplify qobject refcount Marc-André Lureau
2018-04-13 16:18 ` [Qemu-devel] [PATCH v4 1/4] qobject: ensure base is at offset 0 Marc-André Lureau
2018-04-13 16:18 ` [Qemu-devel] [PATCH v4 2/4] qobject: use a QObjectBase_ struct Marc-André Lureau
2018-04-16  8:12   ` Markus Armbruster
2018-04-16  8:31     ` Markus Armbruster
2018-04-16 16:52       ` Marc-André Lureau
2018-04-16 16:51     ` Marc-André Lureau
2018-04-13 16:18 ` [Qemu-devel] [PATCH v4 3/4] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF Marc-André Lureau
2018-04-16  8:57   ` Markus Armbruster
2018-04-17 12:18     ` Marc-André Lureau
2018-04-13 16:18 ` [Qemu-devel] [PATCH v4 4/4] qobject: modify qobject_ref() to assert on NULL and return obj Marc-André Lureau
2018-04-16  8:26   ` Markus Armbruster [this message]
2018-04-16  9:38     ` Markus Armbruster
2018-04-17 13:29     ` 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=87k1t7sgka.fsf@dusky.pond.sub.org \
    --to=armbru@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.