Skip to contentSkip to conversation

certs: Fix some kernel-doc comments

PATCH In review Yang Li 2 participants 2 messages Mar 17, 2022 – Mar 31, 2022

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 certs: Fix some kernel-doc comments

Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'.

certs/system_keyring.c:46: warning: expecting prototype for restrict_link_to_builtin_trusted(). Prototype was for restrict_link_by_builtin_trusted() instead certs/system_keyring.c:80: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

---
 certs/system_keyring.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
certs/system_keyring.c +4 -3
index 05b66ce9d1c9..f0eb8c680cac 100644
@@ -34,7 +34,7 @@ extern __initconst const unsigned long system_certificate_list_size;
 extern __initconst const unsigned long module_cert_size;
 
 /**
- * restrict_link_to_builtin_trusted - Restrict keyring addition by built in CA
+ * restrict_link_by_builtin_trusted - Restrict keyring addition by built in CA
  *
  * Restrict the addition of keys into a keyring based on the key-to-be-added
  * being vouched for by a key in the built in system keyring.
@@ -77,8 +77,9 @@ int restrict_link_by_builtin_and_secondary_trusted(
 }
 
 /**
- * Allocate a struct key_restriction for the "builtin and secondary trust"
- * keyring. Only for use in system_trusted_keyring_init().
+ * get_builtin_and_secondary_restriction - Allocate a struct key_restriction
+ * for the "builtin and secondary trust" keyring. Only for use in
+ * system_trusted_keyring_init().
  */
 static __init struct key_restriction *get_builtin_and_secondary_restriction(void)
 {
Signature · 1 line
2.20.1.7.g153144c
maintainer
#1 lore raw
Quoted 8 lines · Yang Li

/**
- * Allocate a struct key_restriction for the "builtin and secondary trust"
- * keyring. Only for use in system_trusted_keyring_init().
+ * get_builtin_and_secondary_restriction - Allocate a struct key_restriction
+ * for the "builtin and secondary trust" keyring. Only for use in
+ * system_trusted_keyring_init().
*/
static __init struct key_restriction *get_builtin_and_secondary_restriction(void)

Better to just turn the "/**" into "/*" for this one. It's not a function that should necessarily appear in API docs.

David