All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] Smack: fix doc warning
@ 2021-06-07  3:52 ChenXiaoSong
  2021-06-08 17:38 ` Casey Schaufler
  0 siblings, 1 reply; 2+ messages in thread
From: ChenXiaoSong @ 2021-06-07  3:52 UTC (permalink / raw)
  To: casey, jmorris, serge
  Cc: linux-security-module, linux-kernel, yukuai3, yi.zhang, chenxiaosong2

Fix gcc W=1 warning:

security/smack/smack_access.c:342: warning: Function parameter or member 'ad' not described in 'smack_log'
security/smack/smack_access.c:403: warning: Function parameter or member 'skp' not described in 'smk_insert_entry'
security/smack/smack_access.c:487: warning: Function parameter or member 'level' not described in 'smk_netlbl_mls'
security/smack/smack_access.c:487: warning: Function parameter or member 'len' not described in 'smk_netlbl_mls'

Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
---
 security/smack/smack_access.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
index efe2406a3960..1f391f6a3d47 100644
--- a/security/smack/smack_access.c
+++ b/security/smack/smack_access.c
@@ -332,7 +332,7 @@ static void smack_log_callback(struct audit_buffer *ab, void *a)
  *  @object_label  : smack label of the object being accessed
  *  @request: requested permissions
  *  @result: result from smk_access
- *  @a:  auxiliary audit data
+ *  @ad:  auxiliary audit data
  *
  * Audit the granting or denial of permissions in accordance
  * with the policy.
@@ -396,6 +396,7 @@ struct hlist_head smack_known_hash[SMACK_HASH_SLOTS];
 
 /**
  * smk_insert_entry - insert a smack label into a hash map,
+ * @skp: smack label
  *
  * this function must be called under smack_known_lock
  */
@@ -476,8 +477,10 @@ char *smk_parse_smack(const char *string, int len)
 
 /**
  * smk_netlbl_mls - convert a catset to netlabel mls categories
+ * @level: MLS sensitivity level
  * @catset: the Smack categories
  * @sap: where to put the netlabel categories
+ * @len: number of bytes for the levels in a CIPSO IP option
  *
  * Allocates and fills attr.mls
  * Returns 0 on success, error code on failure.
-- 
2.25.4


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

* Re: [PATCH -next] Smack: fix doc warning
  2021-06-07  3:52 [PATCH -next] Smack: fix doc warning ChenXiaoSong
@ 2021-06-08 17:38 ` Casey Schaufler
  0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2021-06-08 17:38 UTC (permalink / raw)
  To: ChenXiaoSong, jmorris, serge
  Cc: linux-security-module, linux-kernel, yukuai3, yi.zhang, Casey Schaufler

On 6/6/2021 8:52 PM, ChenXiaoSong wrote:
> Fix gcc W=1 warning:
>
> security/smack/smack_access.c:342: warning: Function parameter or member 'ad' not described in 'smack_log'
> security/smack/smack_access.c:403: warning: Function parameter or member 'skp' not described in 'smk_insert_entry'
> security/smack/smack_access.c:487: warning: Function parameter or member 'level' not described in 'smk_netlbl_mls'
> security/smack/smack_access.c:487: warning: Function parameter or member 'len' not described in 'smk_netlbl_mls'
>
> Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>

Added to smack-next. Thank you.

> ---
>  security/smack/smack_access.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
> index efe2406a3960..1f391f6a3d47 100644
> --- a/security/smack/smack_access.c
> +++ b/security/smack/smack_access.c
> @@ -332,7 +332,7 @@ static void smack_log_callback(struct audit_buffer *ab, void *a)
>   *  @object_label  : smack label of the object being accessed
>   *  @request: requested permissions
>   *  @result: result from smk_access
> - *  @a:  auxiliary audit data
> + *  @ad:  auxiliary audit data
>   *
>   * Audit the granting or denial of permissions in accordance
>   * with the policy.
> @@ -396,6 +396,7 @@ struct hlist_head smack_known_hash[SMACK_HASH_SLOTS];
>  
>  /**
>   * smk_insert_entry - insert a smack label into a hash map,
> + * @skp: smack label
>   *
>   * this function must be called under smack_known_lock
>   */
> @@ -476,8 +477,10 @@ char *smk_parse_smack(const char *string, int len)
>  
>  /**
>   * smk_netlbl_mls - convert a catset to netlabel mls categories
> + * @level: MLS sensitivity level
>   * @catset: the Smack categories
>   * @sap: where to put the netlabel categories
> + * @len: number of bytes for the levels in a CIPSO IP option
>   *
>   * Allocates and fills attr.mls
>   * Returns 0 on success, error code on failure.

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

end of thread, other threads:[~2021-06-08 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  3:52 [PATCH -next] Smack: fix doc warning ChenXiaoSong
2021-06-08 17:38 ` Casey Schaufler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.