Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] iomap: fix kernel-doc warnings in iomap.h
@ 2026-11-23  9:15 TAKANO Mitsuhiro
  2026-11-25  7:00 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: TAKANO Mitsuhiro @ 2026-11-23  9:15 UTC (permalink / raw)
  To: linux-fsdevel, Christian Brauner
  Cc: linux-xfs, Christoph Hellwig, Darrick J . Wong, TAKANO Mitsuhiro

kernel-doc -Wall reports eight distinct warnings for include/linux/iomap.h,
each printed twice:

  struct member 'fbatch' not described in 'iomap_iter'
  struct member 'private' not described in 'iomap_iter'
  No description found for return value of 'iomap_length_trim'
  No description found for return value of 'iomap_length'
  function parameter 'iter' not described in 'iomap_iter_advance_full'
  No description found for return value of 'iomap_iter_advance_full'
  No description found for return value of 'iomap_iter_srcmap'
  No description found for return value of 'iomap_iter_next'

Document @fbatch (the batch of dirty folios iomap_zero_range() passes for
iomap_fill_dirty_folios() to fill) and @private (the file system's own
data, opaque to iomap), add the missing @iter to
iomap_iter_advance_full(), and add Return: sections.

iomap_iter_next() ended its description with "Returns 1 to continue
iterating, 0 once the range is fully consumed, or a negative errno on
error." without a colon, so kernel-doc found no return description.  Add
the colon, and say that 0 is also returned when the file system made no
progress without marking the mapping stale, as iomap_iter_continue() does.

Fix the two typos in the iomap_iter_srcmap() description, and the
&i->iomap that renders as a broken cross-reference, while there.

After:

  $ scripts/kernel-doc -Wall -none include/linux/iomap.h
  (no output)

No functional change.

The changelog and the added kernel-doc text were written with Hermes Agent
(deepseek-v4.1-flash); I reviewed them against the code and ran
kernel-doc -Wall on the file before and after.  No build was run, as only
comments change.

Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
 include/linux/iomap.h | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 372453dbf2d4..c82608169077 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -259,6 +259,9 @@ struct iomap_ops {
  * @flags: Zero or more of the iomap_begin flags above.
  * @iomap: Map describing the I/O iteration
  * @srcmap: Source map for COW operations
+ * @fbatch: Optional batch of dirty folios for zero-range processing, set up
+ *	by iomap_zero_range() and filled by iomap_fill_dirty_folios()
+ * @private: File system specific data for this iteration; opaque to iomap
  */
 struct iomap_iter {
 	struct inode *inode;
@@ -282,8 +285,9 @@ int iomap_iter_advance(struct iomap_iter *iter, u64 count);
  * @pos: File position to trim from.
  * @len: Length of the mapping to trim to.
  *
- * Returns a trimmed length that the operation applies to for the current
- * iteration.
+ * Return: The length that the operation applies to for the current
+ * iteration: @len, limited to the end of the current mapping and, if
+ * @iter->srcmap is not a hole, to the end of the source mapping.
  */
 static inline u64 iomap_length_trim(const struct iomap_iter *iter, loff_t pos,
 		u64 len)
@@ -299,7 +303,9 @@ static inline u64 iomap_length_trim(const struct iomap_iter *iter, loff_t pos,
  * iomap_length - length of the current iomap iteration
  * @iter: iteration structure
  *
- * Returns the length that the operation applies to for the current iteration.
+ * Return: The length of the current iteration: @iter->len, limited to the end
+ * of the current mapping and, if @iter->srcmap is not a hole, to the end of
+ * the source mapping.
  */
 static inline u64 iomap_length(const struct iomap_iter *iter)
 {
@@ -308,6 +314,9 @@ static inline u64 iomap_length(const struct iomap_iter *iter)
 
 /**
  * iomap_iter_advance_full - advance by the full length of current map
+ * @iter: iteration structure
+ *
+ * Return: Always 0.
  */
 static inline int iomap_iter_advance_full(struct iomap_iter *iter)
 {
@@ -319,9 +328,12 @@ static inline int iomap_iter_advance_full(struct iomap_iter *iter)
  * @i: iteration structure
  *
  * Write operations on file systems with reflink support might require a
- * source and a destination map.  This function retourns the source map
- * for a given operation, which may or may no be identical to the destination
- * map in &i->iomap.
+ * source and a destination map.  This function returns the source map
+ * for a given operation, which may or may not be identical to the destination
+ * map in ``i->iomap``.
+ *
+ * Return: The source map for the current iteration, or a pointer to
+ * ``i->iomap`` if there is no separate source map.
  */
 static inline const struct iomap *iomap_iter_srcmap(const struct iomap_iter *i)
 {
@@ -350,7 +362,8 @@ int iomap_iter_continue(const struct iomap_iter *iter, struct iomap *iomap,
  * compile-time-constant @begin and @end callbacks, the compiler can call them
  * directly, avoiding the indirect-call overhead.
  *
- * Returns 1 to continue iterating, 0 once the range is fully consumed, or a
+ * Return: 1 to continue iterating, 0 once the range is fully consumed or the
+ * file system made no progress without marking the mapping stale, or a
  * negative errno on error.
  */
 static __always_inline int iomap_iter_next(const struct iomap_iter *iter,

base-commit: 4c7bbc7f82ff8820a4c9be8f662430bec640e2da
-- 
2.53.0


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

* Re: [PATCH] iomap: fix kernel-doc warnings in iomap.h
  2026-11-23  9:15 [PATCH] iomap: fix kernel-doc warnings in iomap.h TAKANO Mitsuhiro
@ 2026-11-25  7:00 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2026-11-25  7:00 UTC (permalink / raw)
  To: TAKANO Mitsuhiro
  Cc: linux-fsdevel, Christian Brauner, linux-xfs, Christoph Hellwig,
	Darrick J . Wong

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


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

end of thread, other threads:[~2026-11-25  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  9:15 [PATCH] iomap: fix kernel-doc warnings in iomap.h TAKANO Mitsuhiro
2026-11-25  7:00 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox