From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, Eduardo Otubo <otubo@redhat.com>,
qemu-devel@nongnu.org
Cc: armbru@redhat.com, mjt@tls.msk.ru, agraf@suse.de, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH] dma/i82374: avoid double creation of i82374 device
Date: Mon, 26 Mar 2018 14:16:54 +0200 [thread overview]
Message-ID: <8fb61d6b-820a-5de1-4879-1f34f736d91b@redhat.com> (raw)
In-Reply-To: <773067e7-21e6-351b-16d4-4d4558f68825@redhat.com>
On 26/03/2018 14:14, Thomas Huth wrote:
>> + object_ref(OBJECT(dev));
>> + object_property_set_bool(OBJECT(dev), false, "realized", &err);
>> + if (err) {
>> + error_reportf_err(err, "Clean up of device %s failed: ",
>> + object_get_typename(OBJECT(dev)));
>> + exit(1);
>> + }
>> + object_unref(OBJECT(dev));
>> +}
>
> I'm not a qdev expert, but I wonder whether we need the full object_ref
> + unref dance here? If not, you could get rid of this function and
> simply do the object_property_set_bool(OBJECT(dev), false, "realized",
> &error_fatal) twice in i8257_dma_init() instead.
No, however we do need an object_unparent call.
Paolo
next prev parent reply other threads:[~2018-03-26 12:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 11:18 [Qemu-devel] [PATCH] dma/i82374: avoid double creation of i82374 device Eduardo Otubo
2018-03-26 12:14 ` Thomas Huth
2018-03-26 12:16 ` Paolo Bonzini [this message]
2018-03-26 15:20 ` Philippe Mathieu-Daudé
-- strict thread matches above, loose matches on Subject: below --
2017-09-15 9:06 Eduardo Otubo
2017-09-15 10:18 ` Paolo Bonzini
2017-09-15 11:53 ` Eduardo Otubo
2017-09-15 22:21 ` Eduardo Habkost
2017-09-16 8:09 ` Paolo Bonzini
2017-09-24 21:02 ` [Qemu-devel] [[PATCH] " Michael Tokarev
2017-09-25 9:11 ` Paolo Bonzini
2017-09-25 9:26 ` Eduardo Otubo
2017-09-25 9:36 ` Paolo Bonzini
2017-09-25 10:54 ` [Qemu-devel] [PATCH] " Michael Tokarev
2017-09-25 11:25 ` Paolo Bonzini
2017-09-01 11:03 Eduardo Otubo
2017-09-01 14:30 ` Eduardo Habkost
2017-09-01 15:34 ` Markus Armbruster
2017-09-01 15:44 ` Eduardo Habkost
2017-09-02 9:15 ` Aurelien Jarno
2017-09-07 16:05 ` Paolo Bonzini
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=8fb61d6b-820a-5de1-4879-1f34f736d91b@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=otubo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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).