Skip to contentSkip to conversation

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

PATCH RESEND In review Randy Dunlap 2 participants 2 messages Jul 3, 2023 – Jul 14, 2023 Documentation

lore
Share & tools
lore

Randy Dunlap

author reviewer
#0 lore raw

PATCH RESEND v2 1/1 Documentation: doc-guide: use '%' constant indicator in Return: examples

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

---
v2: in Subject, spell 'examples' correctly;
Add Link: and Acked-by: Steven
add Note:

Note: %-ECODE or -%ECODE both work well.

 Documentation/doc-guide/kernel-doc.rst |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/doc-guide/kernel-doc.rst +5 -5
diff -- 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
maintainer
#1 lore raw
Quoted 14 lines · Randy Dunlap

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

---
v2: in Subject, spell 'examples' correctly;
Add Link: and Acked-by: Steven
add Note:

Quoted 4 lines

Note: %-ECODE or -%ECODE both work well.

 Documentation/doc-guide/kernel-doc.rst |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

I'm not convinced that this %notation really helps the documentation rather than just cluttering...but for now we have it, so I've applied this.

Thanks,

jon