From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYyLx-0000D5-FK for qemu-devel@nongnu.org; Fri, 09 Dec 2011 06:11:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYyLs-0002eD-Mr for qemu-devel@nongnu.org; Fri, 09 Dec 2011 06:10:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYyLs-0002e7-GK for qemu-devel@nongnu.org; Fri, 09 Dec 2011 06:10:52 -0500 Message-ID: <4EE1ED75.3050303@redhat.com> Date: Fri, 09 Dec 2011 12:13:57 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1322857256-14951-1-git-send-email-aliguori@us.ibm.com> <1322857256-14951-17-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1322857256-14951-17-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 16/18] qom: optimize qdev_get_canonical_path using a parent link List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffman , Markus Armbruster Am 02.12.2011 21:20, schrieb Anthony Liguori: > The full tree search was a bit unreasonable. > > Signed-off-by: Anthony Liguori > diff --git a/hw/qdev.h b/hw/qdev.h > index 4351e2e..fdab848 100644 > --- a/hw/qdev.h > +++ b/hw/qdev.h > @@ -92,6 +92,10 @@ struct DeviceState { > uint32_t ref; > > QTAILQ_HEAD(, DeviceProperty) properties; > + > + /* Do not, under any circumstance, use this parent link below anywhere > + * outside of qdev.c. You have been warned. */ > + DeviceState *parent; > }; I would expect that a warning works better if it tells people _why_ their code will break if they do it anyway (it's not clear to me) Kevin