From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbSc8-0006er-Dq for qemu-devel@nongnu.org; Mon, 14 Sep 2015 08:12:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbSc5-0007wu-C2 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 08:12:04 -0400 References: <1442194913-26545-1-git-send-email-david@gibson.dropbear.id.au> <1442194913-26545-2-git-send-email-david@gibson.dropbear.id.au> <55F683CB.6000508@ozlabs.ru> <20150914114503.GP2547@voom.fritz.box> From: Paolo Bonzini Message-ID: <55F6B989.8010900@redhat.com> Date: Mon, 14 Sep 2015 14:11:53 +0200 MIME-Version: 1.0 In-Reply-To: <20150914114503.GP2547@voom.fritz.box> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, mdroth@linux.vnet.ibm.com, bharata@linux.vnet.ibm.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 14/09/2015 13:45, David Gibson wrote: >>> >>> === * There is no way for a child to determine what its parent >>> is. It is not * a bidirectional relationship. This is by >>> design. === >>> >>> This part always confused me as there is "Object *parent" in >>> the "struct Object". So there is way to determine but it must >>> not be used? Is it debug only? >>> >>> Anyway, all members of the Object class are under /*< private >>> >*/ so they should not be accesses in sPAPR code, I believe. > Ah, good point, I missed that. I guess we have to keep the owner > field, redundant though it seems. Blech. I think the comment is wrong or at least inaccurate; it only applies to the external QOM interface. The patch is a good idea, even though OBJECT(x)->y traditionally is not used (instead you assign OBJECT(x) to a different Object* variable). Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV9rmEAAoJEL/70l94x66DRYEH/3vWHTrKc5m3aoPgyxlSRCJf dKWtYVhCJ4SFhhtW5v/XTB5ze6PWa8gg/Vv5hBUAhFAaoGkCx2jtLfP/+KS/oYT3 8x+JS9SpWQGjlsaIHGD91HenaOARafgsnJVNp4HqQPPz3IAfYP7noDNrVXhN4eQF zjWnIVdfqD7nUW/f8zzVM3Xv7WEiV19K6foOUs/LTC6OEiqkOIAruvTqIAXn0MHe bTeoWivfibO2Iomq6zExuNnSDjmqrdXuY4jmgMLzpzwrisczy2cCG0wbb0yzuK87 9UXtF90MNC/dIFMVrwmujruR2fWEvorIs+ZR+Udq2n5saau+4WUaX7ATOZzyVao= =5cbm -----END PGP SIGNATURE-----