qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as private
Date: Fri, 23 May 2014 13:23:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Am 23.05.2014 13:13, schrieb Peter Maydell:
> On 9 May 2014 16:56, Peter Maydell <address@hidden> 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: ‘iomem’ is deprecated (declared at 
>> /root/qemu/include/hw/intc/arm_gic_common.h:105): this field is private 
>> [-Werror=deprecated-declarations]
> 
> 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

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]