diff mbox series

[-next] ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment

Message ID 20220110030229.19864-1-yang.lee@linux.alibaba.com
State Superseded
Headers show
Series [-next] ext4: Fix jbd2_journal_shrink_scan() and jbd2_journal_shrink_count() kernel-doc comment | expand

Commit Message

Yang Li Jan. 10, 2022, 3:02 a.m. UTC
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(+)

Comments

Jan Kara Jan. 10, 2022, 11:29 a.m. UTC | #1
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
diff mbox series

Patch

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.
  */