[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8734bsdf7f.fsf@trenco.lwn.net>
Date: Sat, 21 Jun 2025 14:15:00 -0600
From: Jonathan Corbet <corbet@....net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: workflows@...r.kernel.org, linux-doc@...r.kernel.org,
netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH] docs: process: discourage pointless boilerplate kdoc
Jakub Kicinski <kuba@...nel.org> writes:
> 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@...nel.org>
> ---
> CC: corbet@....net
> CC: workflows@...r.kernel.org
> CC: linux-doc@...r.kernel.org
> ---
> Documentation/process/coding-style.rst | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
> index 19d2ed47ff79..d1a8e5465ed9 100644
> --- a/Documentation/process/coding-style.rst
> +++ b/Documentation/process/coding-style.rst
> @@ -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.
Applied, thanks.
jon
Powered by blists - more mailing lists