qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC v4 1/5] hw/arm: add very initial support for Canon DIGIC SoC
Date: Fri, 6 Sep 2013 09:01:12 +0400	[thread overview]
Message-ID: <20130906090112.ed1e60beb8fe5ccb52f31e80@gmail.com> (raw)
In-Reply-To: <5228F9D2.1080006@suse.de>

On Thu, 05 Sep 2013 23:38:26 +0200
Andreas Färber <afaerber@suse.de> wrote:

> Am 05.09.2013 23:23, schrieb Antony Pavlov:
> > On Thu, 05 Sep 2013 20:08:34 +0200
> > Andreas Färber <afaerber@suse.de> wrote:
> >> Am 05.09.2013 09:52, schrieb Antony Pavlov:
> >>> diff --git a/hw/arm/digic.c b/hw/arm/digic.c
> >>> new file mode 100644
> >>> index 0000000..95a9fcd
> >>> --- /dev/null
> >>> +++ b/hw/arm/digic.c
> [...]
> >>> +static const TypeInfo digic_type_info = {
> >>> +    .name = TYPE_DIGIC,
> >>> +    .parent = TYPE_DEVICE,
> >>> +    .instance_size = sizeof(DigicState),
> >>> +    .instance_init = digic_init,
> >>> +    .class_init = digic_class_init,
> >>> +};
> >>> +
> >>> +static void digic_register_types(void)
> >>> +{
> >>> +    type_register_static(&digic_type_info);
> >>> +}
> >>> +
> >>> +type_init(digic_register_types)
> >>> diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h
> >>> new file mode 100644
> >>> index 0000000..0ef4723
> >>> --- /dev/null
> >>> +++ b/include/hw/arm/digic.h
> [...]
> >>> +typedef struct DigicState {
> >>
> >> Please add
> >>     /*< private >*/
> >>
> >>> +    Object parent_obj;
> >>
> >>     /*< private >*/
> > 
> > /*< public >*/ ?
> 
> Yes, sorry, copy&paste and then noticing Object. ;)
> Or just leave the latter out so that all fields are undocumented.

I have grepped the qemu code and found that the "private" and "public" labels
usage is:

=== quote start ===
    typedef struct SomethingState {
       /*< private >*/
       DeviceState parent_obj;
       /*< public >*/

       some_type public_field1;
=== quote end ===

Is there any intention in empty line after the "public" label and no empty line befor it?
Can I wrote something like this:

=== quote start ===
    typedef struct SomethingState {
       /*< private >*/
       DeviceState parent_obj;

       /*< public >*/
       some_type public_field1;
=== quote end ===

?


> >> markers for documentation.
> >>
> >> It needs to be DeviceState parent_obj though.
> > 
> > In your tegra2 support 'Object parent_obj' is used in a similar situation.
> > 
> > http://repo.or.cz/w/qemu/afaerber.git/blob/refs/heads/tegra:/include/hw/arm/tegra2.h#l42
> 
> Thanks for spotting, fixed. (It used to be derived from TYPE_OBJECT, but
> we decided to provide QOM realize support only for devices.)
> 
> Unfortunately Tegra kernel is still stuck after USB init either way...
> 
> 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


-- 
-- 
Best regards,
  Antony Pavlov

  reply	other threads:[~2013-09-06  5:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05  7:52 [Qemu-devel] [RFC v4 0/5] hw/arm: add initial support for Canon DIGIC SoC Antony Pavlov
2013-09-05  7:52 ` [Qemu-devel] [RFC v4 1/5] hw/arm: add very " Antony Pavlov
2013-09-05 18:08   ` Andreas Färber
2013-09-05 21:23     ` Antony Pavlov
2013-09-05 21:38       ` Andreas Färber
2013-09-06  5:01         ` Antony Pavlov [this message]
2013-09-05  7:52 ` [Qemu-devel] [RFC v4 2/5] hw/arm/digic: prepare DIGIC-based boards support Antony Pavlov
2013-09-05 17:54   ` Peter Maydell
2013-09-06  7:12     ` Antony Pavlov
2013-09-05  7:52 ` [Qemu-devel] [RFC v4 3/5] hw/arm/digic: add timer support Antony Pavlov
2013-09-05  7:52 ` [Qemu-devel] [RFC v4 4/5] hw/arm/digic: add UART support Antony Pavlov
2013-09-05 18:17   ` Peter Maydell
2013-09-06  6:54     ` Antony Pavlov
2013-09-06  7:25       ` Peter Maydell
2013-09-06 13:00         ` Antony Pavlov
2013-09-06 13:40           ` Peter Maydell
2013-09-07  5:45             ` Antony Pavlov
2013-09-07  8:33               ` Peter Maydell
2013-09-05  7:52 ` [Qemu-devel] [RFC v4 5/5] hw/arm/digic: add NOR ROM support Antony Pavlov
2013-09-05 18:19   ` Peter Maydell

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=20130906090112.ed1e60beb8fe5ccb52f31e80@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    /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).