public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] KernelDoc
Date: Wed, 26 Sep 2012 17:26:55 +0200	[thread overview]
Message-ID: <201209261726.55611.marex@denx.de> (raw)
In-Reply-To: <20120926071743.238A42031A9@gemini.denx.de>

Dear Wolfgang Denk,

> Dear Marek,
> 
> In message <201209252246.10322.marex@denx.de> you wrote:
> > I've had a discussion with Wolfgang just now about U-Boot coding style. I
> > tried using KernelDoc in a patch, which is not part of the U-Boot Coding
> > Style now, thus it was rejected.
> > 
> > I really like the idea of annotating functions with proper description,
> > thus I would like to ask, can we reach a general agreement and start
> > using kerneldoc in U-Boot to annotate functions and possibly generate
> > documentation? Or shall we use anything else?
> > 
> > Or any other annotation stuff? Doxygen style? Shall it be optional or
> > mandatory?
> 
> Unfortunately the important (to me) part of our discussion is
> presented here only in the last half sentence...
> 
> The points I was trying to make was this:
> 
>  - If we introdue any documentation system, we should do this
>    "officially", not sneak it in with some patch here and there.

Yes

>  - The first thing we should define is what we want to use it for,
>    i.  e. the purpose.

1) Know what every single function does and what do it's arguments mean, so we 
have properly documented code and every time you hack on something, you won't 
need to do guesswork. This is true especially for some larger functions.
2) To automatically generated code documentation, maybe in HTML format, and put 
it on the webserver. Some people might find it useful.

I myself like 1) more than 2), 2) is not so important for me.

>  - When introducing something, we should also agree on a policy and
>    guidelines how we want to see it used.
> 
> Questions that need to be answered include:
> 
> - What is the goal we want to acchieve?  Complete documentation of all
>   U-Boot code?  Documentation of some sub-system?  ... ?

The former is the ultimate goal, yes. It should have been from the begining. I 
just recently figured out how important it is to have a proper documentation 
(yes, during the DM).

> - Will we make this mandatory?  So that we will reject all new code
>   that is not documented according to kernel-doc rules?

Yes please, make it mandatory. Otherwise people won't obey and the documentation 
will suffer ... and all this would be meaningless.

> - If so, what does that mean for patches that touch existing code?

Ask the current custodian to annotate their code.

>   If I change the major part of an existing function (without changing
>   it's calling interface), am I obligued to add kernel-doc comments?

Yes. Even though major vs. minor change seems pretty vague, common sense shall 
be applied here.

>   If I change the calling interface, must I add documentation then?

Of course, yes.

> - What sort of documentation do we generate?

None for starters, since it will be incomplete. I would postpone the generation 
as a stage 2 here.

> How can we make clear
>   that for a long, long time it will cover only a small fraction of
>   the actual code, eventually even parts of some source files?

Pardon me, but I don't follow here. It will certainly for a while cover only 
small parts of U-Boot code. We need something like "kernel-janitors" here :-)

> - Who will be responsible for maintaining the documentation?

I believe for now we should only focus on using this as a standardized method of 
anotating functions. The reviewer of the patch shall check if the patch is 
correct incl. the documentation, as usual.

> For
>   making sure it gives a usable result, it looks more or less
>   consistent?

Reviewer. The documentation generation shall be postponed.

> - What about internationalization?  Who will do the translations? ;-)
> 
> Best regards,
> 
> Wolfgang Denk

Best regards,
Marek Vasut

  reply	other threads:[~2012-09-26 15:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25 20:46 [U-Boot] KernelDoc Marek Vasut
2012-09-26  6:50 ` Prabhakar Lad
2012-09-26  7:12   ` Wolfgang Denk
2012-09-26  7:23     ` Prabhakar Lad
2012-09-26 10:07       ` Wolfgang Denk
2012-09-26  7:17 ` Wolfgang Denk
2012-09-26 15:26   ` Marek Vasut [this message]
2012-09-26 18:50     ` Joe Hershberger
2012-09-26 19:05       ` Marek Vasut
2012-09-26 19:54     ` Wolfgang Denk
2012-09-26 19:58       ` Marek Vasut
2012-09-26 20:57         ` Wolfgang Denk
2012-09-26 21:31           ` Tom Rini
2012-09-26 23:38           ` Marek Vasut
2012-10-01  8:54             ` Wolfgang Denk
2012-10-01  9:07               ` Marek Vasut
2012-10-01 10:35                 ` Wolfgang Denk
2012-10-01 10:37                   ` Marek Vasut
2012-10-09 22:49                     ` Tom Rini
2012-10-09 23:35                       ` Marek Vasut
2012-10-14 20:26                       ` Marek Vasut
2012-09-26 20:00       ` Tom Rini
2012-09-27  6:19       ` Stefan Roese
2012-09-27 17:26         ` Tom Rini
2012-09-27 17:28         ` Fabio Estevam
2012-09-27 23:50         ` Graeme Russ
2012-09-28  0:28           ` Marek Vasut
2012-09-28  0:28     ` Scott Wood
2012-09-28  0:44       ` Marek Vasut
2012-09-26 19:05 ` Tom Rini
2012-09-26 19:10   ` Marek Vasut
2012-09-26 19:46     ` Wolfgang Denk
2012-09-26 19:54       ` Marek Vasut
2012-09-26 20:49         ` Wolfgang Denk
2012-09-26 23:36           ` Marek Vasut
2012-09-26 19:57     ` Tom Rini
2012-09-26 23:39       ` Marek Vasut
2012-09-28 19:48 ` Marek Vasut

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=201209261726.55611.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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