public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: improve kerneldoc of blk_mq_add_to_batch()
@ 2025-03-12  7:27 Shin'ichiro Kawasaki
  2025-03-12  7:43 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shin'ichiro Kawasaki @ 2025-03-12  7:27 UTC (permalink / raw)
  To: linux-block, Jens Axboe; +Cc: Christoph Hellwig, Shin'ichiro Kawasaki

Commit f00baf2eac78 ("block: change blk_mq_add_to_batch() third argument
type to bool") added kerneldoc style comment of blk_mq_add_to_batch().
However, it did not follow the kerneldoc format and was incomplete.
Improve the comment to follow the format.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
This is the follow-up fix for the patch titled "[PATCH v2 0/2] block: nvme: fix
blktests nvme/039 failure" [1]. Reviews will be appreciated.

I ran the command

  $ scripts/kernel-doc -v include/linux/blk-mq.h

and confirmed the modified comment follows the kerneldoc format.

[1] https://lore.kernel.org/linux-block/20250311104359.1767728-3-shinichiro.kawasaki@wdc.com/

 include/linux/blk-mq.h | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index d904e870e72d..aba9c24486aa 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -852,14 +852,17 @@ static inline bool blk_mq_is_reserved_rq(struct request *rq)
 	return rq->rq_flags & RQF_RESV;
 }
 
-/*
- * Batched completions only work when there is no I/O error and no special
- * ->end_io handler.
- *
+/**
+ * blk_mq_add_to_batch() - add a request to the completion batch
  * @req: The request to add to batch
  * @iob: The batch to add the request
  * @is_error: Specify true if the request failed with an error
- * @io_comp_batch: The completaion handler for the request
+ * @complete: The completaion handler for the request
+ *
+ * Batched completions only work when there is no I/O error and no special
+ * ->end_io handler.
+ *
+ * Return: true when the request was added to the batch, otherwise false
  */
 static inline bool blk_mq_add_to_batch(struct request *req,
 				       struct io_comp_batch *iob, bool is_error,
-- 
2.47.0


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

end of thread, other threads:[~2025-03-12 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12  7:27 [PATCH] block: improve kerneldoc of blk_mq_add_to_batch() Shin'ichiro Kawasaki
2025-03-12  7:43 ` Christoph Hellwig
2025-03-12 13:26 ` Jens Axboe
2025-03-12 14:27 ` Jens Axboe

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