From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnna4-0002Sk-0J for qemu-devel@nongnu.org; Fri, 23 May 2014 07:24:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnnZy-0000TS-4A for qemu-devel@nongnu.org; Fri, 23 May 2014 07:24:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41025 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnnZx-0000TC-Ti for qemu-devel@nongnu.org; Fri, 23 May 2014 07:24:02 -0400 Message-ID: <537F2FCF.4060406@suse.de> Date: Fri, 23 May 2014 13:23:59 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1399650964-21067-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as private List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , QEMU Developers Cc: Paolo Bonzini , Anthony Liguori , Patch Tracking Am 23.05.2014 13:13, schrieb Peter Maydell: > On 9 May 2014 16:56, Peter Maydell wrote: >> This patch series provides infrastructure and documentation >> for marking QOM struct fields as private to the class implementation. >> >> Patch 1 is the implementation (which is a trivial five lines!) and >> documentation of the code pattern that it's intended to be used with. >> >> Patches 2, 3 and 4 are examples of its use: patch 2 deals with >> the ARM GIC classes, as an example of a largish class with some >> subclasses. Patches 3 and 4 are conversions of much simpler and >> smaller devices, so might be easier to look at first. >> >> A .h file which uses this pattern ends up with half a dozen >> extra lines of boilerplate, which is slightly sad but not too >> awful. It would be pretty easy to autogenerate (along with the >> type macros themselves) if we decided to do that in future, though. >> >> Example of the compiler message if you try to touch a field >> which is private: >> arm_gic_kvm.c:559:5: error: =E2=80=98iomem=E2=80=99 is deprecated (de= clared at /root/qemu/include/hw/intc/arm_gic_common.h:105): this field is= private [-Werror=3Ddeprecated-declarations] >=20 > Ping? I believe I remarked that in the example typedef struct Foo { would be more in line with our Coding Style and majority of users. Other than that, I have no objections and assumed you'll take it through your arm queue. Cheers, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg