mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Smack: fix kernel-doc interface on functions
@ 2020-11-13  7:26 Alex Shi
  2020-11-13 16:36 ` Casey Schaufler
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Shi @ 2020-11-13  7:26 UTC (permalink / raw)
  Cc: Casey Schaufler, James Morris, Serge E. Hallyn,
	linux-security-module, linux-kernel

The are some kernel-doc interface issues:
security/smack/smackfs.c:1950: warning: Function parameter or member
'list' not described in 'smk_parse_label_list'
security/smack/smackfs.c:1950: warning: Excess function parameter
'private' description in 'smk_parse_label_list'
security/smack/smackfs.c:1979: warning: Function parameter or member
'list' not described in 'smk_destroy_label_list'
security/smack/smackfs.c:1979: warning: Excess function parameter 'head'
description in 'smk_destroy_label_list'
security/smack/smackfs.c:2141: warning: Function parameter or member
'count' not described in 'smk_read_logging'
security/smack/smackfs.c:2141: warning: Excess function parameter 'cn'
description in 'smk_read_logging'
security/smack/smackfs.c:2278: warning: Function parameter or member
'format' not described in 'smk_user_access'

Correct them in this patch.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 security/smack/smackfs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index e567b4baf3a0..5d44b7d258ef 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -1942,7 +1942,7 @@ static void smk_list_swap_rcu(struct list_head *public,
  * smk_parse_label_list - parse list of Smack labels, separated by spaces
  *
  * @data: the string to parse
- * @private: destination list
+ * @list: destination list
  *
  * Returns zero on success or error code, as appropriate
  */
@@ -1973,7 +1973,7 @@ static int smk_parse_label_list(char *data, struct list_head *list)
 
 /**
  * smk_destroy_label_list - destroy a list of smack_known_list_elem
- * @head: header pointer of the list to destroy
+ * @list: header pointer of the list to destroy
  */
 void smk_destroy_label_list(struct list_head *list)
 {
@@ -2131,7 +2131,7 @@ static const struct file_operations smk_unconfined_ops = {
  * smk_read_logging - read() for /smack/logging
  * @filp: file pointer, not actually used
  * @buf: where to put the result
- * @cn: maximum to send along
+ * @count: maximum to send along
  * @ppos: where to start
  *
  * Returns number of bytes read or error code, as appropriate
@@ -2272,6 +2272,7 @@ static const struct file_operations smk_load_self_ops = {
  * @buf: data from user space
  * @count: bytes sent
  * @ppos: where to start - must be 0
+ * @format: /smack/load or /smack/load2 or /smack/change-rule format.
  */
 static ssize_t smk_user_access(struct file *file, const char __user *buf,
 				size_t count, loff_t *ppos, int format)
-- 
2.29.GIT


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Smack: fix kernel-doc interface on functions
  2020-11-13  7:26 [PATCH] Smack: fix kernel-doc interface on functions Alex Shi
@ 2020-11-13 16:36 ` Casey Schaufler
  0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2020-11-13 16:36 UTC (permalink / raw)
  To: Alex Shi
  Cc: James Morris, Serge E. Hallyn, linux-security-module,
	linux-kernel, Casey Schaufler

On 11/12/2020 11:26 PM, Alex Shi wrote:
> The are some kernel-doc interface issues:
> security/smack/smackfs.c:1950: warning: Function parameter or member
> 'list' not described in 'smk_parse_label_list'
> security/smack/smackfs.c:1950: warning: Excess function parameter
> 'private' description in 'smk_parse_label_list'
> security/smack/smackfs.c:1979: warning: Function parameter or member
> 'list' not described in 'smk_destroy_label_list'
> security/smack/smackfs.c:1979: warning: Excess function parameter 'head'
> description in 'smk_destroy_label_list'
> security/smack/smackfs.c:2141: warning: Function parameter or member
> 'count' not described in 'smk_read_logging'
> security/smack/smackfs.c:2141: warning: Excess function parameter 'cn'
> description in 'smk_read_logging'
> security/smack/smackfs.c:2278: warning: Function parameter or member
> 'format' not described in 'smk_user_access'
>
> Correct them in this patch.
>
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Casey Schaufler <casey@schaufler-ca.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: linux-security-module@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org

Thanks. I'll take this through the Smack tree.

> ---
>  security/smack/smackfs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
> index e567b4baf3a0..5d44b7d258ef 100644
> --- a/security/smack/smackfs.c
> +++ b/security/smack/smackfs.c
> @@ -1942,7 +1942,7 @@ static void smk_list_swap_rcu(struct list_head *public,
>   * smk_parse_label_list - parse list of Smack labels, separated by spaces
>   *
>   * @data: the string to parse
> - * @private: destination list
> + * @list: destination list
>   *
>   * Returns zero on success or error code, as appropriate
>   */
> @@ -1973,7 +1973,7 @@ static int smk_parse_label_list(char *data, struct list_head *list)
>  
>  /**
>   * smk_destroy_label_list - destroy a list of smack_known_list_elem
> - * @head: header pointer of the list to destroy
> + * @list: header pointer of the list to destroy
>   */
>  void smk_destroy_label_list(struct list_head *list)
>  {
> @@ -2131,7 +2131,7 @@ static const struct file_operations smk_unconfined_ops = {
>   * smk_read_logging - read() for /smack/logging
>   * @filp: file pointer, not actually used
>   * @buf: where to put the result
> - * @cn: maximum to send along
> + * @count: maximum to send along
>   * @ppos: where to start
>   *
>   * Returns number of bytes read or error code, as appropriate
> @@ -2272,6 +2272,7 @@ static const struct file_operations smk_load_self_ops = {
>   * @buf: data from user space
>   * @count: bytes sent
>   * @ppos: where to start - must be 0
> + * @format: /smack/load or /smack/load2 or /smack/change-rule format.
>   */
>  static ssize_t smk_user_access(struct file *file, const char __user *buf,
>  				size_t count, loff_t *ppos, int format)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-13 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13  7:26 [PATCH] Smack: fix kernel-doc interface on functions Alex Shi
2020-11-13 16:36 ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®