qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: scottwood@freescale.com, qemu-ppc@nongnu.org,
	qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH 2/2] intc/openpic: Convert to QOM realize
Date: Tue, 18 Jun 2013 17:49:37 +0200	[thread overview]
Message-ID: <51C08191.7040509@suse.de> (raw)
In-Reply-To: <CAEgOgz7sctdOz=C-uXhA=_c86wtwbgm12Nze4+Pq6+t1Yq_VVw@mail.gmail.com>

Hi,

Am 18.06.2013 05:28, schrieb Peter Crosthwaite:
> On Tue, Jun 18, 2013 at 11:58 AM, Andreas Färber <afaerber@suse.de> wrote:
>> Split qdev initfn into instance_init and realize functions.
>> Change one occurrence of "klass" while at it.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
> 
> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> 
>> ---
>>  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? Or can we just follow-up with a sed across the
tree at some point once there is agreement on the naming?

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	other threads:[~2013-06-18 15:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  1:58 [Qemu-devel] [PATCH 0/2] ppc: QOM'ify openpic device Andreas Färber
2013-06-18  1:58 ` [Qemu-devel] [PATCH 1/2] intc/openpic: QOM'ify Andreas Färber
2013-06-18  3:18   ` Peter Crosthwaite
2013-06-18  1:58 ` [Qemu-devel] [PATCH 2/2] intc/openpic: Convert to QOM realize Andreas Färber
2013-06-18  3:28   ` Peter Crosthwaite
2013-06-18 15:49     ` Andreas Färber [this message]
2013-06-18 23:06       ` Peter Crosthwaite
2013-06-18 12:32 ` [Qemu-devel] [PATCH 0/2] ppc: QOM'ify openpic device Alexander Graf
2013-06-18 12:35   ` Andreas Färber
2013-06-18 12:39     ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C08191.7040509@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).