[PATCH 2/2] VFS: fix __start_dirop() kernel-doc warnings

Bagas Sanjaya posted 2 patches 1 month, 3 weeks ago
[PATCH 2/2] VFS: fix __start_dirop() kernel-doc warnings
Posted by Bagas Sanjaya 1 month, 3 weeks ago
Sphinx report kernel-doc warnings:

WARNING: ./fs/namei.c:2853 function parameter 'state' not described in '__start_dirop'
WARNING: ./fs/namei.c:2853 expecting prototype for start_dirop(). Prototype was for __start_dirop() instead

Fix them up.

Fixes: ff7c4ea11a05c8 ("VFS: add start_creating_killable() and start_removing_killable()")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 fs/namei.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/namei.c b/fs/namei.c
index bf0f66f0e9b92c..91fd3a786704e2 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2836,10 +2836,11 @@ static int filename_parentat(int dfd, struct filename *name,
 }
 
 /**
- * start_dirop - begin a create or remove dirop, performing locking and lookup
+ * __start_dirop - begin a create or remove dirop, performing locking and lookup
  * @parent:       the dentry of the parent in which the operation will occur
  * @name:         a qstr holding the name within that parent
  * @lookup_flags: intent and other lookup flags.
+ * @state:        task state bitmask
  *
  * The lookup is performed and necessary locks are taken so that, on success,
  * the returned dentry can be operated on safely.
-- 
An old man doll... just what I always wanted! - Clara
Re: [PATCH 2/2] VFS: fix __start_dirop() kernel-doc warnings
Posted by NeilBrown 1 month, 1 week ago
On Fri, 19 Dec 2025, Bagas Sanjaya wrote:
> Sphinx report kernel-doc warnings:
> 
> WARNING: ./fs/namei.c:2853 function parameter 'state' not described in '__start_dirop'
> WARNING: ./fs/namei.c:2853 expecting prototype for start_dirop(). Prototype was for __start_dirop() instead
> 
> Fix them up.
> 
> Fixes: ff7c4ea11a05c8 ("VFS: add start_creating_killable() and start_removing_killable()")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  fs/namei.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index bf0f66f0e9b92c..91fd3a786704e2 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -2836,10 +2836,11 @@ static int filename_parentat(int dfd, struct filename *name,
>  }
>  
>  /**
> - * start_dirop - begin a create or remove dirop, performing locking and lookup
> + * __start_dirop - begin a create or remove dirop, performing locking and lookup
>   * @parent:       the dentry of the parent in which the operation will occur
>   * @name:         a qstr holding the name within that parent
>   * @lookup_flags: intent and other lookup flags.
> + * @state:        task state bitmask

I would really rather the doco comment was moved to be before
start_dirop(), and left unchanged.

Otherwise we would really need to actually docoument "@state", not just
add vague words to shut the checker up.

There was already been a patch posted to do this.

NeilBrown


>   *
>   * The lookup is performed and necessary locks are taken so that, on success,
>   * the returned dentry can be operated on safely.
> -- 
> An old man doll... just what I always wanted! - Clara
> 
> 
Re: [PATCH 2/2] VFS: fix __start_dirop() kernel-doc warnings
Posted by Jeff Layton 1 month, 2 weeks ago
On Fri, 2025-12-19 at 09:46 +0700, Bagas Sanjaya wrote:
> Sphinx report kernel-doc warnings:
> 
> WARNING: ./fs/namei.c:2853 function parameter 'state' not described in '__start_dirop'
> WARNING: ./fs/namei.c:2853 expecting prototype for start_dirop(). Prototype was for __start_dirop() instead
> 
> Fix them up.
> 
> Fixes: ff7c4ea11a05c8 ("VFS: add start_creating_killable() and start_removing_killable()")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  fs/namei.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index bf0f66f0e9b92c..91fd3a786704e2 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -2836,10 +2836,11 @@ static int filename_parentat(int dfd, struct filename *name,
>  }
>  
>  /**
> - * start_dirop - begin a create or remove dirop, performing locking and lookup
> + * __start_dirop - begin a create or remove dirop, performing locking and lookup
>   * @parent:       the dentry of the parent in which the operation will occur
>   * @name:         a qstr holding the name within that parent
>   * @lookup_flags: intent and other lookup flags.
> + * @state:        task state bitmask
>   *
>   * The lookup is performed and necessary locks are taken so that, on success,
>   * the returned dentry can be operated on safely.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Re: [PATCH 2/2] VFS: fix __start_dirop() kernel-doc warnings
Posted by Jan Kara 1 month, 2 weeks ago
On Fri 19-12-25 09:46:20, Bagas Sanjaya wrote:
> Sphinx report kernel-doc warnings:
> 
> WARNING: ./fs/namei.c:2853 function parameter 'state' not described in '__start_dirop'
> WARNING: ./fs/namei.c:2853 expecting prototype for start_dirop(). Prototype was for __start_dirop() instead
> 
> Fix them up.
> 
> Fixes: ff7c4ea11a05c8 ("VFS: add start_creating_killable() and start_removing_killable()")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/namei.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index bf0f66f0e9b92c..91fd3a786704e2 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -2836,10 +2836,11 @@ static int filename_parentat(int dfd, struct filename *name,
>  }
>  
>  /**
> - * start_dirop - begin a create or remove dirop, performing locking and lookup
> + * __start_dirop - begin a create or remove dirop, performing locking and lookup
>   * @parent:       the dentry of the parent in which the operation will occur
>   * @name:         a qstr holding the name within that parent
>   * @lookup_flags: intent and other lookup flags.
> + * @state:        task state bitmask
>   *
>   * The lookup is performed and necessary locks are taken so that, on success,
>   * the returned dentry can be operated on safely.
> -- 
> An old man doll... just what I always wanted! - Clara
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR