From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbeCp-0005fd-7A for qemu-devel@nongnu.org; Mon, 14 Sep 2015 20:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbeCn-0003J9-Hw for qemu-devel@nongnu.org; Mon, 14 Sep 2015 20:34:43 -0400 Date: Tue, 15 Sep 2015 10:31:17 +1000 From: David Gibson Message-ID: <20150915003117.GS2547@voom.fritz.box> 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> <55F6B989.8010900@redhat.com> <55F6D479.4010301@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dQ2XShfnd5GHxhN7" Content-Disposition: inline In-Reply-To: <55F6D479.4010301@ozlabs.ru> 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: Alexey Kardashevskiy Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, Paolo Bonzini --dQ2XShfnd5GHxhN7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 15, 2015 at 12:06:49AM +1000, Alexey Kardashevskiy wrote: > On 09/14/2015 10:11 PM, Paolo Bonzini wrote: > >-----BEGIN PGP SIGNED MESSAGE----- > >Hash: SHA256 > > > > > > > >On 14/09/2015 13:45, David Gibson wrote: > >>>> > >>>>=3D=3D=3D * There is no way for a child to determine what its parent > >>>>is. It is not * a bidirectional relationship. This is by > >>>>design. =3D=3D=3D > >>>> > >>>>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. >=20 >=20 > Is this case external? I'm assyming by "external" Paolo means outside qemu - i.e. access via the qapi monitor. > Originally I was looking for a object_get_parent() but it is not there so= I > decided that the comment is correct or I just fail to understand it :) >=20 >=20 > >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). >=20 >=20 >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --dQ2XShfnd5GHxhN7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJV92bVAAoJEGw4ysog2bOSMhYQAIccwoYAjKC0FYLS4jKIUwLy 2qvsfuzL0kkhFthgV0I6g+EVbD8R9Q2NlHQh6+GHsssKT/L74BIGpAFCQ/okZQ68 1dozkKyIEsIIAImZqaEtgveZhqLHFqCO2avCWpkMkISxKkvRQw2fgBK4qwN9rgTV 2lLKmS2FjJ5QlbiFNLsj7tXfAH8pPIIGZ8gmHGXoee6AhSV3bJHWzucbBV6hoZrD Ci3bqbafVJtQfCEPEUzD4aYvb/eoxgHP97nNC7up2LHxJamZTne1ZLI5ItEPmBn0 RPV+S3Q2LOO7gs2fDIbuzp9JkOxuIGsxA3LeUTtq2nvKgFVK1oM36ntwJUyCddq6 TtJ0gOqhnWkB+3g5+ltT+pilm5LlqzdBoAk7TeMZJZxpsQChGKCxStPts/yVNw+l 86Q/xnhxQl4Usb6LbvfDq04q0O2hOLmzVgNo2DrN6gKssXkiZgx080DHN0Qork/i 58x7SG3KnnP1IsQu0Zpo4uhl0Axt8443AVaaBfjUZkRfPagGGXG4Ky0jVk2xdR7E FGnWWPZvD/wwDpaRiZ7k+79Yi8BMc4781nQzTRSUfMMN7y5D3kVYrcyXsndA5lKO G8Gx5qDAkT+2ramvRo70Q3WiOtGoldo3m968ijq8ye/AeGT4xL5G4LfJ7e15Y/ce TAZQxM/PQJEfwq4vYsp4 =4ihv -----END PGP SIGNATURE----- --dQ2XShfnd5GHxhN7--