qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] intc/openpic: Convert to QOM realize


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [PATCH 2/2] intc/openpic: Convert to QOM realize
Date: Wed, 19 Jun 2013 09:06:06 +1000

Hi Andreas,

On Wed, Jun 19, 2013 at 1:49 AM, Andreas Färber <address@hidden> wrote:
> Hi,
>
> Am 18.06.2013 05:28, schrieb Peter Crosthwaite:
>> On Tue, Jun 18, 2013 at 11:58 AM, Andreas Färber <address@hidden> wrote:
>>> Split qdev initfn into instance_init and realize functions.
>>> Change one occurrence of "klass" while at it.
>>>
>>> Signed-off-by: Andreas Färber <address@hidden>
>>
>> Reviewed-by: Peter Crosthwaite <address@hidden>
>>
>>> ---
>>>  hw/intc/openpic.c | 34 +++++++++++++++++++---------------
>>>  1 file changed, 19 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
>>> index 875c6b8..2d6b05c 100644
>>> --- a/hw/intc/openpic.c
>>> +++ b/hw/intc/openpic.c
>>> @@ -1531,8 +1531,16 @@ static void map_list(OpenPICState *opp, const MemReg 
>>> *list, int *count)
>>>      }
>>>  }
>>>
>>> -static int openpic_init(SysBusDevice *dev)
>>> +static void openpic_init(Object *obj)
>>>  {
>>> +    OpenPICState *opp = OPENPIC(obj);
>>> +
>>> +    memory_region_init(&opp->mem, "openpic", 0x40000);
>>> +}
>>> +
>>> +static void openpic_realize(DeviceState *dev, Error **errp)
>>> +{
>>> +    SysBusDevice *d = SYS_BUS_DEVICE(dev);
>>
>> FWIW, i have been using "sbd" for this variable name in similar
>> conversions (sdhci, xilinx_spips, axidma, axienet and a few friends).
>> There are also a few other precedents out there such as arm_gic.
>
> So far we don't seem to have a consistent convention. I've seen busdev,
> sysbusdev, d; also pcidev vs. pci_dev vs. d for PCIDevice etc.
>
> sbd is fine with me, too. But since we're not yet consistent in using oc
> rather than klass either (including in your super class RFC), do you see
> a strong need to respin?

No definitely not. Just trying to open the discussion so we can do
this consistently in future.

> Or can we just follow-up with a sed across the
> tree at some point once there is agreement on the naming?
>

Yes. Sound like a plan. No point blocking these cleanups on undecided issues.

Regards.
Peter

> We should collect naming conventions into the QOMConventions Wiki page.
>
> Regards,
> 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]