Re: [PATCH] certs: system_keyring.c: clean up kernel-doc
From: Mimi Zohar
Date: Wed Oct 27 2021 - 20:12:52 EST
Hi Randy,
On Sun, 2021-10-24 at 17:38 -0700, Randy Dunlap wrote:
> Fix some kernel-doc warnings in system_keyring.c:
>
> system_keyring.c:43: warning: expecting prototype for restrict_link_to_builtin_trusted(). Prototype was for restrict_link_by_builtin_trusted() instead
> system_keyring.c:77: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> * Allocate a struct key_restriction for the "builtin and secondary trust"
> system_keyring.c:77: warning: missing initial short description on line:
> * Allocate a struct key_restriction for the "builtin and secondary trust"
>
> Fix the warnings above and then see & fix these:
>
> system_keyring.c:43: warning: No description found for return value of 'restrict_link_by_builtin_trusted'
> system_keyring.c:62: warning: No description found for return value of 'restrict_link_by_builtin_and_secondary_trusted'
> system_keyring.c:190: warning: No description found for return value of 'verify_pkcs7_message_sig'
> system_keyring.c:275: warning: No description found for return value of 'verify_pkcs7_signature'
>
> This still leaves non-exported two functions that do not have their
> functions parameters documented: restrict_link_by_builtin_trusted() and
> restrict_link_by_builtin_and_secondary_trusted().
>
> Use '%' preceding constants in kernel-doc notation.
>
> Use "builtin" consistently instead of "built in" or "built-in".
>
> Don't use "/**" to begin a comment that is not in kernel-doc format.
>
> Document the use of VERIFY_USE_SECONDARY_KEYRING and
> VERIFY_USE_PLATFORM_KEYRING.
>
Thanks, Randy. Even after these changes there are additional kernel
doc warnings. Missing are the parameter definitions for
restrict_link_by_builtin_trusted() and
restrict_link_by_builtin_and_secondary_trusted(). The first three are
exactly the same as for restrict_link_by_signature(). The fourth parm
needs to be tweaked.
Mimi