From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB5ae-0007AV-2l for qemu-devel@nongnu.org; Wed, 05 Feb 2014 11:44:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WB5aV-0006Cm-JP for qemu-devel@nongnu.org; Wed, 05 Feb 2014 11:44:43 -0500 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]:35719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB5aV-0006Cf-Ev for qemu-devel@nongnu.org; Wed, 05 Feb 2014 11:44:35 -0500 Received: by mail-qc0-f176.google.com with SMTP id e16so1020701qcx.21 for ; Wed, 05 Feb 2014 08:44:35 -0800 (PST) Sender: Paolo Bonzini Message-ID: <52F26A6E.5030000@redhat.com> Date: Wed, 05 Feb 2014 17:44:30 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1391614612-21107-1-git-send-email-imammedo@redhat.com> <1391614612-21107-3-git-send-email-imammedo@redhat.com> <52F25E3B.3050009@suse.de> In-Reply-To: <52F25E3B.3050009@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v6 2/9] qdev: add to BusState "hotplug-handler" link List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= , Igor Mammedov , qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, aliguori@amazon.com, mst@redhat.com, jan.kiszka@siemens.com, marcel.a@redhat.com, armbru@redhat.com, blauwirbel@gmail.com, alex.williamson@redhat.com, kraxel@redhat.com, stefanha@redhat.com Il 05/02/2014 16:52, Andreas Färber ha scritto: >> > + object_property_add_link(obj, QDEV_HOTPLUG_HANDLER_PROPERTY, >> > + TYPE_HOTPLUG_HANDLER, >> > + (Object **)&bus->hotplug_handler, NULL); > Will/should the user ever change that property? If not, we could drop > this hunk and change the inline link-setting below to just do it the C > way. Otherwise it should probably be using &error_abort instead of NULL. No, they shouldn't. But OTOH it's probably useful in general to _read_ the property, and links handle reference counting nicely too. It's similar to the parent_bus link. I think we should add something like getter/setter for links like we have for object_property_add_str, because in most of the current cases the link should be read-only. It should not hold this series, though. Paolo