Re: [PATCH v3 0/1] Compactly make code examples into literal blocks

From: Jonathan Corbet
Date: Fri Mar 27 2020 - 13:11:10 EST


On Fri, 27 Mar 2020 09:50:22 -0700
Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> Let me just check I understand Jani's proposal here. You want to change
>
> * Return: Number of pages, or negative errno on failure
>
> to
>
> * Return
> * ~~~~~~
> * Number of pages, or negative errno on failure
>
> If so, I oppose such an increase in verbosity and I think most others
> would too. If not, please let me know what you're actually proposing ;-)

I told you there would be resistance :)

I think a reasonable case can be made for using the same documentation
format throughout our docs, rather than inventing something special for
kerneldoc comments. So I personally don't think the above is terrible,
but as I already noted, I anticipate resistance.

An alternative would be to make a little sphinx extension; then it would
read more like:

.. returns:: Number of pages, except when the moon is full

...which would still probably not be entirely popular.

jon