Documentation: doc-guide: use '%' constant indicator in Return: exmaples

Message ID 20221122184909.7764-1-rdunlap@infradead.org
State New
Headers
Series Documentation: doc-guide: use '%' constant indicator in Return: exmaples |

Commit Message

Randy Dunlap Nov. 22, 2022, 6:49 p.m. UTC
  Use the 'constant' indicator '%' in the examples for the
Return: values syntax. This can help encourage people to use it.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
---
 Documentation/doc-guide/kernel-doc.rst |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Comments

Steven Rostedt Nov. 22, 2022, 11:38 p.m. UTC | #1
On Tue, 22 Nov 2022 10:49:09 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:

> Use the 'constant' indicator '%' in the examples for the
> Return: values syntax. This can help encourage people to use it.
> 

Link: https://lore.kernel.org/lkml/20221121154358.36856ca6@gandalf.local.home/

Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve


> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> ---
>  Documentation/doc-guide/kernel-doc.rst |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 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
> @@ -151,9 +151,9 @@ named ``Return``.
>       line breaks, so if you try to format some text nicely, as in::
>  
>  	* Return:
> -	* 0 - OK
> -	* -EINVAL - invalid argument
> -	* -ENOMEM - out of memory
> +	* %0 - OK
> +	* %-EINVAL - invalid argument
> +	* %-ENOMEM - out of memory
>  
>       this will all run together and produce::
>  
> @@ -163,8 +163,8 @@ named ``Return``.
>       ReST list, e. g.::
>  
>        * Return:
> -      * * 0		- OK to runtime suspend the device
> -      * * -EBUSY	- Device should not be runtime suspended
> +      * * %0		- OK to runtime suspend the device
> +      * * %-EBUSY	- Device should not be runtime suspended
>  
>    #) If the descriptive text you provide has lines that begin with
>       some phrase followed by a colon, each of those phrases will be taken
  

Patch

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
@@ -151,9 +151,9 @@  named ``Return``.
      line breaks, so if you try to format some text nicely, as in::
 
 	* Return:
-	* 0 - OK
-	* -EINVAL - invalid argument
-	* -ENOMEM - out of memory
+	* %0 - OK
+	* %-EINVAL - invalid argument
+	* %-ENOMEM - out of memory
 
      this will all run together and produce::
 
@@ -163,8 +163,8 @@  named ``Return``.
      ReST list, e. g.::
 
       * Return:
-      * * 0		- OK to runtime suspend the device
-      * * -EBUSY	- Device should not be runtime suspended
+      * * %0		- OK to runtime suspend the device
+      * * %-EBUSY	- Device should not be runtime suspended
 
   #) If the descriptive text you provide has lines that begin with
      some phrase followed by a colon, each of those phrases will be taken