Re: [patch net-next v4 5/9] genetlink: introduce per-sock family private pointer storage

Jacob Keller
2023-11-28T20:00:44Z

On 11/28/2023 8:18 AM, Andy Shevchenko wrote:
> On Tue, Nov 28, 2023 at 01:30:51PM +0100, Przemek Kitszel wrote:
>> On 11/23/23 19:15, Jiri Pirko wrote:
>
> ...
>
>>> + * Returns: valid pointer on success, otherwise NULL.
>>
>> since you are going to post next revision,
>>
>> kernel-doc requires "Return:" section (singular form)
>> https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation
>>
>> for new code we should strive to fulfil the requirement
>> (or piss-off someone powerful enough to change the requirement ;))
>
> Interestingly that the script accepts plural for a few keywords.
> Is it documented somewhere as deprecated?
>

I also checked the source:

$git grep --count -h 'Returns:' | awk '{ sum += $1 } END { print sum }'3646

$git grep --count -h 'Return:' | awk '{ sum += $1 } END { print sum }'
10907

So there is a big favor towards using 'Return:', but there are still
about 1/3 as many uses of 'Returns:'.

I dug into kernel-doc and it looks like it has accepted both "Return"
and "Returns" since the first time that section headers were limited:
f624adef3d0b ("kernel-doc: limit the "section header:" detection to a
select few")

I don't see any documentation on 'Returns;' being deprecated, but the
documentation does only call out 'Return:'.

Thanks,
Jake