audit: Fix some kernel-doc warnings

Message ID 20221025060333.4295-1-liubo03@inspur.com
State New
Headers
Series audit: Fix some kernel-doc warnings |

Commit Message

Bo Liu Oct. 25, 2022, 6:03 a.m. UTC
  The current code provokes some kernel-doc warnings:
    security/lsm_audit.c:198: warning: Function parameter or member 'ab' not described in 'dump_common_audit_data'

Signed-off-by: Bo Liu <liubo03@inspur.com>
---
 security/lsm_audit.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Randy Dunlap Oct. 25, 2022, 3:53 p.m. UTC | #1
On 10/24/22 23:03, Bo Liu wrote:
> The current code provokes some kernel-doc warnings:
>     security/lsm_audit.c:198: warning: Function parameter or member 'ab' not described in 'dump_common_audit_data'
> 
> Signed-off-by: Bo Liu <liubo03@inspur.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  security/lsm_audit.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/security/lsm_audit.c b/security/lsm_audit.c
> index 75cc3f8d2a42..ea5d35dce674 100644
> --- a/security/lsm_audit.c
> +++ b/security/lsm_audit.c
> @@ -190,6 +190,7 @@ static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr,
>  
>  /**
>   * dump_common_audit_data - helper to dump common audit data
> + * @ab : the audit data to fill
>   * @a : common audit data
>   *
>   */
  
Paul Moore Oct. 25, 2022, 11:55 p.m. UTC | #2
On Tue, Oct 25, 2022 at 2:04 AM Bo Liu <liubo03@inspur.com> wrote:
>
> The current code provokes some kernel-doc warnings:
>     security/lsm_audit.c:198: warning: Function parameter or member 'ab' not described in 'dump_common_audit_data'
>
> Signed-off-by: Bo Liu <liubo03@inspur.com>
> ---
>  security/lsm_audit.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/security/lsm_audit.c b/security/lsm_audit.c
> index 75cc3f8d2a42..ea5d35dce674 100644
> --- a/security/lsm_audit.c
> +++ b/security/lsm_audit.c
> @@ -190,6 +190,7 @@ static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr,
>
>  /**
>   * dump_common_audit_data - helper to dump common audit data
> + * @ab : the audit data to fill

When we need to comment on audit_buffer structs we usually refer to it
as "the audit buffer" or similar, e.g. kernel/audit*, and in
lsm_audit.c the term "audit data to fill" is typically used by the
common_audit_data struct.  Please update this patch to something like
the following:

 /**
  * ...
  * @ab: the audit buffer
  * ...
  */

>   * @a : common audit data
>   *
>   */
  

Patch

diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 75cc3f8d2a42..ea5d35dce674 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -190,6 +190,7 @@  static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr,
 
 /**
  * dump_common_audit_data - helper to dump common audit data
+ * @ab : the audit data to fill
  * @a : common audit data
  *
  */