Re: [PATCH net-next] net: reformat kdoc return statements

From
Russell King (Oracle) <linux@armlinux.org.uk>
Date
2024-11-16 16:24:08
Also in
linux-wireless, netfilter-devel
Reply to
Jakub Kicinski, 2024-11-15
On Fri, Nov 15, 2024 at 08:36:12AM -0800, Jakub Kicinski wrote:
kernel-doc -Wall warns about missing Return: statement for non-void
functions. We have a number of kdocs in our headers which are missing
the colon, IOW they use
 * Return some value
or
 * Returns some value

Having the colon makes some sense, it should help kdoc parser avoid
false positives. So add them. This is mostly done with a sed script,
and removing the unnecessary cases (mostly the comments which aren't
kdoc).
I wonder about this... I suspect it's going to be a constant battle to
ensure that docs use Return: or Returns: because it's not "natural"
when writing documentation.

Maybe the tooling should accept a sentence starting "Return(s?)" and
convert it to "Return(s):" in generated documentation?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Thread (10 messages) 10 messages, 8 authors, last reply 2024-11-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help