All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment
@ 2022-01-10  3:02 Yang Li
  2022-01-10 11:29 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2022-01-10  3:02 UTC (permalink / raw)
  To: tytso; +Cc: jack, linux-ext4, linux-kernel, Yang Li, Abaci Robot

Add the description of @shrink and @sc in jbd2_journal_shrink_scan() and
jbd2_journal_shrink_count() kernel-doc comment to remove warnings found
by running scripts/kernel-doc, which is caused by using 'make W=1'.
fs/jbd2/journal.c:1296: warning: Function parameter or member 'shrink'
not described in 'jbd2_journal_shrink_scan'
fs/jbd2/journal.c:1296: warning: Function parameter or member 'sc' not
described in 'jbd2_journal_shrink_scan'
fs/jbd2/journal.c:1320: warning: Function parameter or member 'shrink'
not described in 'jbd2_journal_shrink_count'
fs/jbd2/journal.c:1320: warning: Function parameter or member 'sc' not
described in 'jbd2_journal_shrink_count'

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 fs/jbd2/journal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index f13d548e4a7f..951e6382a884 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1287,6 +1287,8 @@ static int jbd2_min_tag_size(void)
 
 /**
  * jbd2_journal_shrink_scan()
+ * @shrink: A callback you can register to apply pressure to ageable caches.
+ * @sc: pass information from page reclaim to the shrinkers.
  *
  * Scan the checkpointed buffer on the checkpoint list and release the
  * journal_head.
@@ -1312,6 +1314,8 @@ static unsigned long jbd2_journal_shrink_scan(struct shrinker *shrink,
 
 /**
  * jbd2_journal_shrink_count()
+ * @shrink: A callback you can register to apply pressure to ageable caches.
+ * @sc: pass information from page reclaim to the shrinkers.
  *
  * Count the number of checkpoint buffers on the checkpoint list.
  */
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next] ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment
  2022-01-10  3:02 [PATCH -next] ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment Yang Li
@ 2022-01-10 11:29 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2022-01-10 11:29 UTC (permalink / raw)
  To: Yang Li; +Cc: tytso, jack, linux-ext4, linux-kernel, Abaci Robot

On Mon 10-01-22 11:02:29, Yang Li wrote:
> Add the description of @shrink and @sc in jbd2_journal_shrink_scan() and
> jbd2_journal_shrink_count() kernel-doc comment to remove warnings found
> by running scripts/kernel-doc, which is caused by using 'make W=1'.
> fs/jbd2/journal.c:1296: warning: Function parameter or member 'shrink'
> not described in 'jbd2_journal_shrink_scan'
> fs/jbd2/journal.c:1296: warning: Function parameter or member 'sc' not
> described in 'jbd2_journal_shrink_scan'
> fs/jbd2/journal.c:1320: warning: Function parameter or member 'shrink'
> not described in 'jbd2_journal_shrink_count'
> fs/jbd2/journal.c:1320: warning: Function parameter or member 'sc' not
> described in 'jbd2_journal_shrink_count'
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Thanks for the fix! Just one comment below:

>  /**
>   * jbd2_journal_shrink_scan()
> + * @shrink: A callback you can register to apply pressure to ageable caches.
> + * @sc: pass information from page reclaim to the shrinkers.
>   *
>   * Scan the checkpointed buffer on the checkpoint list and release the
>   * journal_head.
> @@ -1312,6 +1314,8 @@ static unsigned long jbd2_journal_shrink_scan(struct shrinker *shrink,
>  
>  /**
>   * jbd2_journal_shrink_count()
> + * @shrink: A callback you can register to apply pressure to ageable caches.
> + * @sc: pass information from page reclaim to the shrinkers.
>   *
>   * Count the number of checkpoint buffers on the checkpoint list.
>   */

I think the comments are unnecessarily verbose and not really helping much.
Maybe just something like:

 * @shrink: shrinker to work on
 * @sc: reclaim request to process

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

end of thread, other threads:[~2022-01-10 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10  3:02 [PATCH -next] ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment Yang Li
2022-01-10 11:29 ` Jan Kara

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.