linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nilfs2: cpfile: fix some kernel-doc warnings
@ 2023-12-20 22:13 Ryusuke Konishi
  0 siblings, 0 replies; 4+ messages in thread
From: Ryusuke Konishi @ 2023-12-20 22:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-nilfs, Randy Dunlap, linux-kernel

From: Randy Dunlap <rdunlap@infradead.org>

Correct the function parameter names for nilfs_cpfile_get_info():

cpfile.c:564: warning: Function parameter or member 'cnop' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Function parameter or member 'mode' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Function parameter or member 'buf' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Function parameter or member 'cisz' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Excess function parameter 'cno' description in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Excess function parameter 'ci' description in 'nilfs_cpfile_get_cpinfo'

Also add missing descriptions of the function's specification.

[ konishi.ryusuke@gmail.com: filled in missing descriptions ]

Link: https://lkml.kernel.org/r/20231220065931.2372-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
---
Andrew, please add this to the queue for the next merge window.
This fixes noticeable kernel-doc warnings for fs/nilfs2/cpfile.c.

Thanks,
Ryusuke Konishi

 fs/nilfs2/cpfile.c | 28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
index 9ebefb3acb0e..39136637f715 100644
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -552,11 +552,29 @@ static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop,
 }
 
 /**
- * nilfs_cpfile_get_cpinfo -
- * @cpfile:
- * @cno:
- * @ci:
- * @nci:
+ * nilfs_cpfile_get_cpinfo - get information on checkpoints
+ * @cpfile: checkpoint file inode
+ * @cnop:   place to pass a starting checkpoint number and receive a
+ *          checkpoint number to continue the search
+ * @mode:   mode of checkpoints that the caller wants to retrieve
+ * @buf:    buffer for storing checkpoints' information
+ * @cisz:   byte size of one checkpoint info item in array
+ * @nci:    number of checkpoint info items to retrieve
+ *
+ * nilfs_cpfile_get_cpinfo() searches for checkpoints in @mode state
+ * starting from the checkpoint number stored in @cnop, and stores
+ * information about found checkpoints in @buf.
+ * The buffer pointed to by @buf must be large enough to store information
+ * for @nci checkpoints.  If at least one checkpoint information is
+ * successfully retrieved, @cnop is updated to point to the checkpoint
+ * number to continue searching.
+ *
+ * Return: Count of checkpoint info items stored in the output buffer on
+ * success, or the following negative error code on failure.
+ * * %-EINVAL	- Invalid checkpoint mode.
+ * * %-ENOMEM	- Insufficient memory available.
+ * * %-EIO	- I/O error (including metadata corruption).
+ * * %-ENOENT	- Invalid checkpoint number specified.
  */
 
 ssize_t nilfs_cpfile_get_cpinfo(struct inode *cpfile, __u64 *cnop, int mode,
-- 
2.34.1


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

* Re: [PATCH] nilfs2: cpfile: fix some kernel-doc warnings
  2023-12-20  7:25 ` Ryusuke Konishi
@ 2023-12-20  7:28   ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2023-12-20  7:28 UTC (permalink / raw)
  To: Ryusuke Konishi; +Cc: linux-kernel, linux-nilfs



On 12/19/23 23:25, Ryusuke Konishi wrote:
> On Wed, Dec 20, 2023 at 3:59 PM Randy Dunlap wrote:
>>
>> Correct the function parameter names for nilfs_cpfile_get_info():
>>
>> cpfile.c:564: warning: Function parameter or member 'cnop' not described in 'nilfs_cpfile_get_cpinfo'
>> cpfile.c:564: warning: Function parameter or member 'mode' not described in 'nilfs_cpfile_get_cpinfo'
>> cpfile.c:564: warning: Function parameter or member 'buf' not described in 'nilfs_cpfile_get_cpinfo'
>> cpfile.c:564: warning: Function parameter or member 'cisz' not described in 'nilfs_cpfile_get_cpinfo'
>> cpfile.c:564: warning: Excess function parameter 'cno' description in 'nilfs_cpfile_get_cpinfo'
>> cpfile.c:564: warning: Excess function parameter 'ci' description in 'nilfs_cpfile_get_cpinfo'
>>
>> This still leaves a few kernel-doc warnings.
>> Also, the function parameters should have descriptions after them.
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
>> Cc: linux-nilfs@vger.kernel.org
>> ---
>>  fs/nilfs2/cpfile.c |    6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff -- a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
>> --- a/fs/nilfs2/cpfile.c
>> +++ b/fs/nilfs2/cpfile.c
>> @@ -554,8 +554,10 @@ static ssize_t nilfs_cpfile_do_get_ssinf
>>  /**
>>   * nilfs_cpfile_get_cpinfo -
>>   * @cpfile:
>> - * @cno:
>> - * @ci:
>> + * @cnop:
>> + * @mode:
>> + * @buf:
>> + * @cisz:
>>   * @nci:
>>   */
>>
> 
> Ah, thank you for pointing it out.
> 
> I would like to fill in the missing descriptions and send it upstream.

Yes, please do.

Thanks.

-- 
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html

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

* Re: [PATCH] nilfs2: cpfile: fix some kernel-doc warnings
  2023-12-20  6:59 Randy Dunlap
@ 2023-12-20  7:25 ` Ryusuke Konishi
  2023-12-20  7:28   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Ryusuke Konishi @ 2023-12-20  7:25 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, linux-nilfs

On Wed, Dec 20, 2023 at 3:59 PM Randy Dunlap wrote:
>
> Correct the function parameter names for nilfs_cpfile_get_info():
>
> cpfile.c:564: warning: Function parameter or member 'cnop' not described in 'nilfs_cpfile_get_cpinfo'
> cpfile.c:564: warning: Function parameter or member 'mode' not described in 'nilfs_cpfile_get_cpinfo'
> cpfile.c:564: warning: Function parameter or member 'buf' not described in 'nilfs_cpfile_get_cpinfo'
> cpfile.c:564: warning: Function parameter or member 'cisz' not described in 'nilfs_cpfile_get_cpinfo'
> cpfile.c:564: warning: Excess function parameter 'cno' description in 'nilfs_cpfile_get_cpinfo'
> cpfile.c:564: warning: Excess function parameter 'ci' description in 'nilfs_cpfile_get_cpinfo'
>
> This still leaves a few kernel-doc warnings.
> Also, the function parameters should have descriptions after them.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
> Cc: linux-nilfs@vger.kernel.org
> ---
>  fs/nilfs2/cpfile.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff -- a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
> --- a/fs/nilfs2/cpfile.c
> +++ b/fs/nilfs2/cpfile.c
> @@ -554,8 +554,10 @@ static ssize_t nilfs_cpfile_do_get_ssinf
>  /**
>   * nilfs_cpfile_get_cpinfo -
>   * @cpfile:
> - * @cno:
> - * @ci:
> + * @cnop:
> + * @mode:
> + * @buf:
> + * @cisz:
>   * @nci:
>   */
>

Ah, thank you for pointing it out.

I would like to fill in the missing descriptions and send it upstream.

Thanks,
Ryusuke Konishi

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

* [PATCH] nilfs2: cpfile: fix some kernel-doc warnings
@ 2023-12-20  6:59 Randy Dunlap
  2023-12-20  7:25 ` Ryusuke Konishi
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2023-12-20  6:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, Ryusuke Konishi, linux-nilfs

Correct the function parameter names for nilfs_cpfile_get_info():

cpfile.c:564: warning: Function parameter or member 'cnop' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Function parameter or member 'mode' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Function parameter or member 'buf' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Function parameter or member 'cisz' not described in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Excess function parameter 'cno' description in 'nilfs_cpfile_get_cpinfo'
cpfile.c:564: warning: Excess function parameter 'ci' description in 'nilfs_cpfile_get_cpinfo'

This still leaves a few kernel-doc warnings.
Also, the function parameters should have descriptions after them.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: linux-nilfs@vger.kernel.org
---
 fs/nilfs2/cpfile.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -- a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c
--- a/fs/nilfs2/cpfile.c
+++ b/fs/nilfs2/cpfile.c
@@ -554,8 +554,10 @@ static ssize_t nilfs_cpfile_do_get_ssinf
 /**
  * nilfs_cpfile_get_cpinfo -
  * @cpfile:
- * @cno:
- * @ci:
+ * @cnop:
+ * @mode:
+ * @buf:
+ * @cisz:
  * @nci:
  */
 

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

end of thread, other threads:[~2023-12-20 22:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-20 22:13 [PATCH] nilfs2: cpfile: fix some kernel-doc warnings Ryusuke Konishi
  -- strict thread matches above, loose matches on Subject: below --
2023-12-20  6:59 Randy Dunlap
2023-12-20  7:25 ` Ryusuke Konishi
2023-12-20  7:28   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).