linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc-guide: kernel-doc: document Returns: spelling
@ 2024-05-22 22:47 Randy Dunlap
  2024-05-23  7:40 ` Jani Nikula
  2024-05-30 19:35 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2024-05-22 22:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, Dmitry Baryshkov, Jonathan Corbet, linux-doc

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.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.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);
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc-guide: kernel-doc: document Returns: spelling
  2024-05-22 22:47 [PATCH] doc-guide: kernel-doc: document Returns: spelling Randy Dunlap
@ 2024-05-23  7:40 ` Jani Nikula
  2024-05-30 19:35 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2024-05-23  7:40 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Randy Dunlap, Dmitry Baryshkov, Jonathan Corbet, linux-doc

On Wed, 22 May 2024, Randy Dunlap <rdunlap@infradead.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@infradead.org>
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc-guide: kernel-doc: document Returns: spelling
  2024-05-22 22:47 [PATCH] doc-guide: kernel-doc: document Returns: spelling Randy Dunlap
  2024-05-23  7:40 ` Jani Nikula
@ 2024-05-30 19:35 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2024-05-30 19:35 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel; +Cc: Randy Dunlap, Dmitry Baryshkov, linux-doc

Randy Dunlap <rdunlap@infradead.org> writes:

> 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.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> ---
>  Documentation/doc-guide/kernel-doc.rst |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-30 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 22:47 [PATCH] doc-guide: kernel-doc: document Returns: spelling Randy Dunlap
2024-05-23  7:40 ` Jani Nikula
2024-05-30 19:35 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).