[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o78xou10.fsf@intel.com>
Date: Thu, 23 May 2024 10:40:43 +0300
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Randy Dunlap <rdunlap@...radead.org>, linux-kernel@...r.kernel.org
Cc: Randy Dunlap <rdunlap@...radead.org>, Dmitry Baryshkov
<dmitry.baryshkov@...aro.org>, Jonathan Corbet <corbet@....net>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH] doc-guide: kernel-doc: document Returns: spelling
On Wed, 22 May 2024, Randy Dunlap <rdunlap@...radead.org> wrote:
> scripts/kernel-doc accepts "Return:" or "Returns:" for describing the
> return value of a function or function-like macro, so document this
> alternative spelling and use it in an example.
I probably chose to document only one in a futile effort to standardize
on one of the alternatives in the kernel, all of which are accepted by
kernel-doc:
$ git grep -i "^ *\*[\t ]*returns\?:" | grep -oi "returns\?" | sort | uniq -c | sort -rn
11711 Return
3992 Returns
1095 RETURN
513 return
361 returns
291 RETURNS
1 RETURNs
Documenting the first two is probably fine. :)
BR,
Jani.
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> Cc: Jonathan Corbet <corbet@....net>
> Cc: linux-doc@...r.kernel.org
> ---
> Documentation/doc-guide/kernel-doc.rst | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -- a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
> --- a/Documentation/doc-guide/kernel-doc.rst
> +++ b/Documentation/doc-guide/kernel-doc.rst
> @@ -143,7 +143,7 @@ Return values
> ~~~~~~~~~~~~~
>
> The return value, if any, should be described in a dedicated section
> -named ``Return``.
> +named ``Return`` (or ``Returns``).
>
> .. note::
>
> @@ -337,7 +337,7 @@ Typedefs with function prototypes can al
> * Description of the type.
> *
> * Context: Locking context.
> - * Return: Meaning of the return value.
> + * Returns: Meaning of the return value.
> */
> typedef void (*type_name)(struct v4l2_ctrl *arg1, void *arg2);
>
>
--
Jani Nikula, Intel
Powered by blists - more mailing lists