mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: adobriyan@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] kernel-doc: nested structs and unions support
Date: Tue, 8 Nov 2005 21:12:56 -0800	[thread overview]
Message-ID: <20051108211256.27adaaeb.rdunlap@xenotime.net> (raw)
In-Reply-To: <20051108213130.GC8256@mars.ravnborg.org>

On Tue, 8 Nov 2005 22:31:30 +0100 Sam Ravnborg wrote:

> On Tue, Nov 08, 2005 at 10:38:10PM +0300, Alexey Dobriyan wrote:
> > Sam, do you like the syntax? I hope properly indented rendering will
> > appear soon.
> Looks good. But I like someone with more kernel-doc experince to
> comment.
> Randy?

The kernel-doc syntax looks good to me.  I'm not so sure about
the presentation part, but I guess that Alexey is stil working
on that part.

I think that I'm agreeing with what Martin Waitz said, that the
implementation is good, but not so sure about the usefulness of it.

Alexey, do you see lots of nested structs (and/or unions) in
kernel APIs?  I haven't gone searching for them.  Have you?
OTOH, it's not costly, so if it works, it's fine.

~Randy


> 	Sam
> 
> > ------------------------------------
> > [PATCH 5/6] kernel-doc: nested structs and unions support
> > 
> > Now something like this
> > 
> > 	struct a {
> > 		struct b_s {
> > 			union {
> > 				int c;
> > 				int g;
> > 			} u;
> > 		} b;
> > 		struct d_s {
> > 			int e;
> > 		} d;
> > 	};
> > 
> > is possible to document with the following kernel-doc comment:
> > 
> > 	/**
> > 	 * struct a - ...
> > 	 *
> > 	 * @b: ...
> > 	 * @b.u: ...
> > 	 * @b.u.c: ...
> > 	 * @b.u.g: ...
> > 	 * @d: ...
> > 	 * @d.e: ...
> > 	 */
> > 
> > Not-Yet-Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> > ---
> > 
> >  scripts/kernel-doc |   33 ++++++++++++++++++++++++++++-----
> >  1 file changed, 28 insertions(+), 5 deletions(-)
> > 
> > --- linux-kernel-doc-004/scripts/kernel-doc	2005-05-09 02:34:59.000000000 +0000
> > +++ linux-kernel-doc-005/scripts/kernel-doc	2005-05-09 03:46:43.000000000 +0000
> > @@ -104,19 +104,26 @@ use strict;
> >  # Beside functions you can also write documentation for structs, unions, 
> >  # enums and typedefs. Instead of the function name you must write the name 
> >  # of the declaration;  the struct/union/enum/typedef must always precede 
> > -# the name. Nesting of declarations is not supported. 
> > +# the name.
> >  # Use the argument mechanism to document members or constants.
> >  # e.g.
> >  # /**
> >  #  * struct my_struct - short description
> >  #  * @a: first member
> >  #  * @b: second member
> > +#  * @c: nested struct
> > +#  * @c.p: first member of nested struct
> > +#  * @c.q: second member of nested struct
> >  #  * 
> >  #  * Longer description
> >  #  */
> >  # struct my_struct {
> >  #     int a;
> >  #     int b;
> > +#     struct her_struct {
> > +#         char **p;
> > +#         short q;
> > +#     } c;
> >  # };
> >  #
> >  # All descriptions can be multiline, except the short function description.

  reply	other threads:[~2005-11-09  5:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 19:38 Alexey Dobriyan
2005-11-08 21:31 ` Sam Ravnborg
2005-11-09  5:12   ` Randy.Dunlap [this message]
2005-11-08 23:05 ` Martin Waitz

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=20051108211256.27adaaeb.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®