Skip to contentSkip to conversation

kthread: Fix documentation build warning

PATCH Applied Jonathan Corbet 2 participants 3 messages Jul 24, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kthread: Fix documentation build warning

The kerneldoc comment for kthread_create() had an incorrect argument name, leading to a warning in the docs build. Correct it, and make one more small step toward a warning-free build.

---
 include/linux/kthread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kthread.h +1 -1
index 4fec8b775895..82e197eeac91 100644
@@ -15,7 +15,7 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
  * @threadfn: the function to run in the thread
  * @data: data pointer for @threadfn()
  * @namefmt: printf-style format string for the thread name
- * @...: arguments for @namefmt.
+ * @arg...: arguments for @namefmt.
  *
  * This macro will create a kthread on the current node, leaving it in
  * the stopped state.  This is just a helper for kthread_create_on_node();
Signature · 1 line
2.9.4
#1 lore raw
Quoted 14 lines · Jonathan Corbet

The kerneldoc comment for kthread_create() had an incorrect argument name, leading to a warning in the docs build. Correct it, and make one more small step toward a warning-free build.

---
 include/linux/kthread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kthread.h +0 -0
index 4fec8b775895..82e197eeac91 100644

include/linux/kthread.h struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), · line 19

Quoted 6 lines
include/linux/kthread.h +1 -1
@@ -15,7 +15,7 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
  * @threadfn: the function to run in the thread
  * @data: data pointer for @threadfn()
  * @namefmt: printf-style format string for the thread name
- * @...: arguments for @namefmt.
+ * @arg...: arguments for @namefmt.
  *

Hm, Documentation/doc-guide/kernel-doc.rst says:
If a function parameter is ``...`` (varargs), it should be listed in kernel-doc notation as: ``@...:``.

but the patch here is for a macro, not a function. Does that make a difference?

Quoted 3 lines
include/linux/kthread.h +0 -0
  * This macro will create a kthread on the current node, leaving it in
  * the stopped state.  This is just a helper for kthread_create_on_node();
Signature · 1 line
~Randy
#2 lore raw
Quoted 9 lines · On Mon, 24 Jul 2017 14:24:44 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 2 lines

+ * @arg...: arguments for @namefmt.
*

Hm, Documentation/doc-guide/kernel-doc.rst says:
If a function parameter is ``...`` (varargs), it should be listed in kernel-doc notation as: ``@...:``.

but the patch here is for a macro, not a function. Does that make a difference?

Macros are a little different. I've tried a couple of times to figure out and rationalize the "..." handling, should maybe do so again. Meanwhile, this makes the warning go away, enough for one day :)

Thanks,

jon