docs: process: discourage pointless boilerplate kdoc
authorJakub Kicinski <kuba@kernel.org>
Sat, 14 Jun 2025 20:42:57 +0000 (13:42 -0700)
committerJonathan Corbet <corbet@lwn.net>
Sat, 21 Jun 2025 20:14:33 +0000 (14:14 -0600)
It appears that folks "less versed in kernel coding" think that its
good style to document every function, even if they have no useful
information to pass to the future readers of the code. This used
to be just a waste of space, but with increased kdoc format linting
it's also a burden when refactoring the code.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Joe Damato <joe@dama.to>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250614204258.61449-1-kuba@kernel.org
Documentation/process/coding-style.rst

index 19d2ed47ff79664dfb699c21e67a4d9c5a9f1189..d1a8e5465ed9568c88b2fd27a5f6866a50a10d8e 100644 (file)
@@ -614,7 +614,10 @@ it.
 
 When commenting the kernel API functions, please use the kernel-doc format.
 See the files at :ref:`Documentation/doc-guide/ <doc_guide>` and
-``scripts/kernel-doc`` for details.
+``scripts/kernel-doc`` for details. Note that the danger of over-commenting
+applies to kernel-doc comments all the same. Do not add boilerplate
+kernel-doc which simply reiterates what's obvious from the signature
+of the function.
 
 The preferred style for long (multi-line) comments is: