From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Darren Hart <dvhart@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
linux-kernel@vger.kernel.org,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 04/36] mutex, futex: adjust kernel-doc markups to generate ReST
Date: Tue, 16 May 2017 07:13:46 -0300 [thread overview]
Message-ID: <20170516071346.2494521e@vento.lan> (raw)
In-Reply-To: <20170515164044.GE17235@fury>
Em Mon, 15 May 2017 09:40:44 -0700
Darren Hart <dvhart@infradead.org> escreveu:
> On Mon, May 15, 2017 at 01:49:19PM +0200, Peter Zijlstra wrote:
> > On Mon, May 15, 2017 at 01:29:58PM +0300, Jani Nikula wrote:
> > > On Mon, 15 May 2017, Peter Zijlstra <peterz@infradead.org> wrote:
> > > > The intention is to aid readability. Making comments worse so that some
> > > > retarded script can generate better html or whatnot is just that,
> > > > retarded.
> > > >
> > > > Code matters, generated documentation not so much. I'll take a comment
> > > > that reads well over one that generates pretty html any day.
> > >
> > > The deal is that if you start your comments with "/**" they'll be
> > > processed with the retarded script to produce pretty html.
> > >
> > > For the most part the comments that generate pretty html also read well,
> > > and we don't expect or want anyone to go overboard with markup. I don't
> > > think it's unreasonable to make small concessions to improve generated
> > > documentation for people who care about it even if you don't.
> >
> > No. Such a concession has pure negative value. It opens the door to more
> > patches converting this or that comment to be prettier or whatnot. And
> > before you know it there's a Markus like idiot spamming you with dozens
> > of crap patches to prettify the generated crud.
>
> Well that I can certainly understand.
>
> >
> > Not to mention that this would mean having to learn this rest crud in
> > order to write these comments.
>
> I have complete confidence in you here Peter :-b
>
> >
> > All things I'm not prepared to do.
> >
> >
> > I'm all for useful comments, but I see no value _at_all_ in this
> > generated nonsense. The only reason I sometimes use the docbook comment
> > style is because its fairly uniform and the build bot gets you a warning
> > when your function signature no longer matches with the comment. But
> > if you make this painful I'll simply stop using them.
> >
>
> Making documentation more accessible to people is a good thing. This type of
> automated publication reduces the barrier to access. The lack of this kind of
> tooling, honestly, also discourages participation among some groups of
> of capable contributors.
>
> That said, I support the direction both Mauro and Peter have voiced to minimize
> the impact to comment blocks. What does rest do with this formatting it doesn't
> understand - does it fail gracefully? Falling back to <verbatim> or something
> like that?
ReST produces a warning or error if it finds something it can't
parse, but it usually doesn't crash. The result of its output usually
is not what you would expect on such cases, though.
So, IMHO, the bare minimum to do is to make sure that it won't produce
errors/warnings.
PS.: kernel-doc itself also produce errors/warnings, if the vars at
the kernel-doc block don't match the ones at the function or if a
documented function was added or removed.
-
That's said, on the subsystems I maintain, I'm not satisfied with the
bare minimum ;) I usually build the html output and look into it
to be sure that the output from kernel-doc also looks nice.
In the case of the media subsystem, we have a big book describing the
userspace API. Non-eventual media developers read the uAPI docs in html
or pdf for API docs before coding.
So, on media subsysem, we ended by adding a few ReST specific
markups[1] where added, in order to improve its readability
in html/pdf, but the main documentation just use what's specified at
Documentation/doc-guide/kernel-doc.rst.
[1] There aren't much such markups used there. As far as I remember,
we use:
- bulleted lists like:
return:
- value 1
- value 2
...
- **bold** when we need to bold something;
- ``literal`` for complex literal strings that %FOO won't handle
(e. g. when it contains space and/or special chars);
- ".. note::" or ".. attention::" in order to bold important
notes, when some function have special requirements
to be called (for example, the need to lock or unlock
some mutex or spin lock before calling it).
For example, the description for "v4l2_ctrl_handler_init_class"
at:
http://www.infradead.org/~mchehab/kernel_docs/media/kapi/v4l2-controls.html
uses an attention markup that bolds that such function should
not be called directly by API clients.
Thanks,
Mauro
next prev parent reply other threads:[~2017-05-16 10:13 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1494596071.git.mchehab@s-opensource.com>
2017-05-12 13:59 ` [PATCH 01/36] docs-rst: convert kernel-hacking to ReST Mauro Carvalho Chehab
2017-05-12 16:35 ` Markus Heiser
2017-05-13 10:03 ` Mauro Carvalho Chehab
2017-05-15 16:50 ` Jonathan Corbet
2017-05-12 13:59 ` [PATCH 02/36] kernel-hacking: update document Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 03/36] docs-rst: convert kernel-locking to ReST Mauro Carvalho Chehab
2017-05-12 16:49 ` Markus Heiser
2017-05-12 16:57 ` Markus Heiser
2017-05-13 9:25 ` Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 04/36] mutex, futex: adjust kernel-doc markups to generate ReST Mauro Carvalho Chehab
2017-05-12 16:41 ` Darren Hart
2017-05-12 21:51 ` Mauro Carvalho Chehab
2017-05-12 22:08 ` Darren Hart
2017-05-12 22:11 ` Peter Zijlstra
2017-05-12 22:19 ` Darren Hart
2017-05-13 9:42 ` Mauro Carvalho Chehab
2017-05-15 7:03 ` Peter Zijlstra
2017-05-15 9:00 ` Mauro Carvalho Chehab
2017-05-15 9:33 ` Peter Zijlstra
2017-05-15 10:29 ` Jani Nikula
2017-05-15 11:49 ` Peter Zijlstra
2017-05-15 12:05 ` Jani Nikula
2017-05-15 16:40 ` Darren Hart
2017-05-16 10:13 ` Mauro Carvalho Chehab [this message]
2017-05-15 17:22 ` Mauro Carvalho Chehab
2017-05-16 11:16 ` Peter Zijlstra
2017-05-16 11:41 ` Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 05/36] locking.rst: reformat locking table Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 06/36] locking.rst: add captions to two tables Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 07/36] locking.rst: Update some ReST markups Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 08/36] docs-rst: convert kgdb DocBook to ReST Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 09/36] kgdb.rst: Adjust ReST markups Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 10/36] conf.py: define a color for important markup on PDF output Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 11/36] docs-rst: conf.py: sort LaTeX documents in alphabetical order Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 12/36] docs-rst: conf.py: remove kernel-documentation from LaTeX Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 13/36] docs-rst: add crypto API book to pdf output Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 14/36] docs-rst: add dev-tools " Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 15/36] docs-rst: add sound " Mauro Carvalho Chehab
2017-05-12 13:59 ` [PATCH 16/36] docs-rst: add userspace API " Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 17/36] docs-rst: convert filesystems book to ReST Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 18/36] docs-rst: filesystems: use c domain references where needed Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 19/36] fs: jbd2: make jbd2_journal_start() kernel-doc parseable Mauro Carvalho Chehab
2017-05-15 13:06 ` Jan Kara
2017-05-12 14:00 ` [PATCH 20/36] docs-rst: don't ignore internal functions for jbd2 docs Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 21/36] fs: locks: Fix some troubles at kernel-doc comments Mauro Carvalho Chehab
2017-05-12 14:02 ` Jeff Layton
2017-05-13 9:14 ` Mauro Carvalho Chehab
2017-05-15 14:51 ` J. Bruce Fields
2017-05-12 14:00 ` [PATCH 22/36] fs: add a blank lines on some " Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 23/36] fs: eventfd: fix identation on kernel-doc Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 24/36] fs: jbd2: escape a string with special chars on a kernel-doc Mauro Carvalho Chehab
2017-05-15 13:05 ` Jan Kara
2017-05-12 14:00 ` [PATCH 25/36] docs-rst: convert libata book to ReST Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 26/36] libata.rst: add c function and struct cross-references Mauro Carvalho Chehab
2017-05-13 6:57 ` kbuild test robot
2017-05-12 14:00 ` [PATCH 27/36] libata: fix identation on a kernel-doc markup Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 28/36] docs-rst: convert s390-drivers DocBook to ReST Mauro Carvalho Chehab
2017-05-15 8:09 ` Cornelia Huck
2017-05-16 9:19 ` Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 29/36] docs-rst: convert networking book " Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 30/36] net: skbuff.h: properly escape a macro name on kernel-doc Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 31/36] net: fix some identation issues at kernel-doc markups Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 32/36] docs-rst: convert z8530book DocBook to ReST Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 33/36] docs-rst: convert scsi " Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 34/36] scsi: fix some kernel-doc markups Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 35/36] docs-rst: convert w1 book to ReST Mauro Carvalho Chehab
2017-05-12 14:00 ` [PATCH 36/36] docs-rst: convert rapidio " Mauro Carvalho Chehab
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=20170516071346.2494521e@vento.lan \
--to=mchehab@s-opensource.com \
--cc=dvhart@infradead.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.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