qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 2/2] target-arm: Minimalistic CPU QOM'ificati


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v6 2/2] target-arm: Minimalistic CPU QOM'ification
Date: Wed, 28 Mar 2012 16:05:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

Am 28.03.2012 16:00, schrieb Max Filippov:
>>>>> +static void arm_cpu_reset(CPUState *c)
>>>>> +{
>>>>> +    ARMCPU *cpu = ARM_CPU(c);
>>>>> +    ARMCPUClass *class = ARM_CPU_GET_CLASS(cpu);
>>>>> +
>>>>> +    class->parent_reset(c);
>>>>
>>>> I thought we were avoiding 'class' in favour of 'klass'?
>>>
>>> I have suggested it once and I can only say it again,
>>> please, call it 'cpu_class'. It is the least surprising name.
>>
>> No, cpu_class is being used for a different class, CPUClass, when
>> twiddling with reset handlers of the parent class, for instance.
>>
>> We could call it arm_cpu_class, but is that any better?
> 
> There's no other class in this context, so why more specific name than
> would be enough?
> It's only a matter of long enough suffix, isn't it?

My point was that using cpu_class for two very different things is not
"least surprising" when reading patches containing minimal context. You
don't always see the declaration, so I'd like to keep it consistent
across functions.

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]