From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFnUy-0004gT-CB for qemu-devel@nongnu.org; Thu, 05 Apr 2012 10:17:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFnUm-0000zf-Fw for qemu-devel@nongnu.org; Thu, 05 Apr 2012 10:17:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFnUm-0000ye-7U for qemu-devel@nongnu.org; Thu, 05 Apr 2012 10:17:04 -0400 Message-ID: <4F7DA95A.5090902@redhat.com> Date: Thu, 05 Apr 2012 16:16:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1333451753-3550-1-git-send-email-pbonzini@redhat.com> <1333451753-3550-24-git-send-email-pbonzini@redhat.com> <4F7AE8F5.50508@suse.de> <4F7AF527.5020404@redhat.com> <4F7D8A40.7040504@suse.de> <4F7D91CD.4080608@redhat.com> <4F7D9EA1.4060807@suse.de> In-Reply-To: <4F7D9EA1.4060807@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 23/25] qom: add realized property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Peter Maydell , aliguori@us.ibm.com, qemu-devel@nongnu.org, Anthony Liguori Il 05/04/2012 15:31, Andreas F=E4rber ha scritto: > Here's how I see it: >=20 > * You add a realize callback to ObjectClass like I did, you add the > Error** parameter that was requested as feedback to mine. > * You add a static object_realize() method that clashes with my > introducing it as a public wrapper function. > * You introduce a function object_get_realized() like I did, only you > defer your implementation to object_is_realized() which I didn't have > and used a new bool realized instead of a state enum (since I left qdev > unmodified). > * You introduce a function object_set_realized() like I did, only you > change the logic to also do unrealize. > * You introduce additional stuff that I don't particularly care about. Since we're nitpicking, I also do correct error propagation. > So my point is, whether you've read some patch or not, I just can't > understand why you couldn't wait a week for me to resend the updated > version Because a week is a long time 10 days before the feature freeze, and (via object_is_realized and a few other small bits) the whole series depends on the implementation of realized. > While having unrealize and propagation is certainly nice, the most > serious issue with yours I see is that it doesn't offer me a way to > actually make use of it outside qdev, so that *I* am left with no > benefit from your patch! Can you explain? I definitely would need to fix this. > Some practical thoughts on how to align both approaches would be helpfu= l > here. For starters, should I name my function object_realize_nofail() > instead? Yes, that would be an idea. I would hope that long-term there would be only one object_realize call during in initial machine creation (i.e. except for hot-plug), but it would be fine as a start. > And could you prefer _one over _1 in your patch please? Yes. > If your problem is Signed-off-by specifically, feel free to invent some > inofficial tag such as Inspired-by or Derived-from-commit-message-by or > resort to a textual reference. I can add the SoB, no problem. Paolo