Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: process: discourage pointless boilerplate kdoc

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

authored by

Jakub Kicinski and committed by
Jonathan Corbet
e5880f95 0242b8b0

+4 -1
+4 -1
Documentation/process/coding-style.rst
··· 614 614 615 615 When commenting the kernel API functions, please use the kernel-doc format. 616 616 See the files at :ref:`Documentation/doc-guide/ <doc_guide>` and 617 - ``scripts/kernel-doc`` for details. 617 + ``scripts/kernel-doc`` for details. Note that the danger of over-commenting 618 + applies to kernel-doc comments all the same. Do not add boilerplate 619 + kernel-doc which simply reiterates what's obvious from the signature 620 + of the function. 618 621 619 622 The preferred style for long (multi-line) comments is: 620 623