* Re: [PATCH net-next] net: reformat kdoc return statements
[not found] ` <ZzjHH-L-ylLe0YhU@shell.armlinux.org.uk>
@ 2024-11-19 0:33 ` Jakub Kicinski
2024-11-19 14:42 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2024-11-19 0:33 UTC (permalink / raw)
To: Russell King (Oracle), Jonathan Corbet
Cc: davem, netdev, edumazet, pabeni, pablo, richardcochran, johannes,
loic.poulain, ryazanov.s.a, dsahern, wintera, hawk,
ilias.apalodimas, jhs, jiri, ecree.xilinx, przemyslaw.kitszel,
netfilter-devel, linux-wireless, linux-doc
On Sat, 16 Nov 2024 16:23:59 +0000 Russell King (Oracle) wrote:
> 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?
I missed this merge window, so we have time, let's ask Jon.
Jon, do you have a preference on making the kernel-doc formatting
accept "* Return" without the colon? vs fixing all the mis-formatting?
Looks like we have roughly 100 of those in networking headers
(just counting those under include/).
FWIW we catch new instances of the missing return problem, so it
shouldn't be getting worse.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: reformat kdoc return statements
2024-11-19 0:33 ` [PATCH net-next] net: reformat kdoc return statements Jakub Kicinski
@ 2024-11-19 14:42 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2024-11-19 14:42 UTC (permalink / raw)
To: Jakub Kicinski, Russell King (Oracle)
Cc: davem, netdev, edumazet, pabeni, pablo, richardcochran, johannes,
loic.poulain, ryazanov.s.a, dsahern, wintera, hawk,
ilias.apalodimas, jhs, jiri, ecree.xilinx, przemyslaw.kitszel,
netfilter-devel, linux-wireless, linux-doc
Jakub Kicinski <kuba@kernel.org> writes:
> On Sat, 16 Nov 2024 16:23:59 +0000 Russell King (Oracle) wrote:
>> 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?
>
> I missed this merge window, so we have time, let's ask Jon.
>
> Jon, do you have a preference on making the kernel-doc formatting
> accept "* Return" without the colon? vs fixing all the mis-formatting?
> Looks like we have roughly 100 of those in networking headers
> (just counting those under include/).
I guess my preference would be to fix the comments and keep the tighter
rule for the format. It's not something I feel hugely strongly about,
though, so I don't think I would try to block an attempt to go the other
way.
Thanks,
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-19 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20241115163612.904906-1-kuba@kernel.org>
[not found] ` <ZzjHH-L-ylLe0YhU@shell.armlinux.org.uk>
2024-11-19 0:33 ` [PATCH net-next] net: reformat kdoc return statements Jakub Kicinski
2024-11-19 14:42 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).