[Top][All Lists]

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

Re: [Qemu-ppc] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState

From: Cédric Le Goater
Subject: Re: [Qemu-ppc] [PATCH] ppc/spapr: QOM'ify sPAPRRTCState
Date: Fri, 3 Mar 2017 18:23:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 03/03/2017 05:54 PM, Thomas Huth wrote:
> On 03.03.2017 15:49, Cédric Le Goater wrote:
>> On 03/03/2017 03:13 PM, Thomas Huth wrote:
>>> On 03.03.2017 14:37, Cédric Le Goater wrote:
>>>> Also use an 'Object *' under the sPAPR machine to hold the RTC
>>>> object.
>>> The change from TYPE_SYS_BUS_DEVICE to TYPE_DEVICE is certainly a good
>>> idea! But what's the advantage of using Object* instead of DeviceState*
>>> in sPAPRMachineState ?
>> it makes spapr_rtc_create() a little simpler.  
>> We could go even further and use a sPAPRRTCState under sPAPRMachineState 
>> that we  would initialize with object_initialize(). 
> I think a sPAPRRTCState* would make more sense here - if you just see an
> Object* and are not familiar with the code, you wonder what this pointer
> is all about (and you then have to cast it to something different if you
> want to do anything with it) ... so IMHO either a DeviceState* or
> sPAPRRTCState* is the better choice here.

I think having a non-pointer is a better for the object lifecycle 
but I don't have a strong opinion on that. We will see what Dave 



reply via email to

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