diff mbox series

[2/3] blk-mq.c: Rework documention of blk_mq_init_sq_queue function

Message ID 20190414031055.26350-2-marcos.souza.org@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/3] blk-mq.c: Add documention of function blk_mq_init_queue | expand

Commit Message

Marcos Paulo de Souza April 14, 2019, 3:10 a.m. UTC
Describing better what the function does, and what the arguments are
meant for.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 block/blk-mq.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

Comments

Chaitanya Kulkarni April 14, 2019, 9:02 p.m. UTC | #1
On 4/13/19 8:11 PM, Marcos Paulo de Souza wrote:
> Describing better what the function does, and what the arguments are
> meant for.
> 
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> ---
>   block/blk-mq.c | 17 ++++++++++++++---
>   1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 4a8277a54c03..fd0bf89b8a73 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -2675,9 +2675,20 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
>   }
>   EXPORT_SYMBOL(blk_mq_init_queue);
>   
> -/*
> - * Helper for setting up a queue with mq ops, given queue depth, and
> - * the passed in mq ops flags.
> +/**
Is following line beyond 80 columns ?
> + * blk_mq_init_sq_queue - Create a new request queue with a SQ queue and tag set
It will be great if we describe what SQ in the above line, otherwise we 
stating just obvious here.
> + * @set: tag set to be associated by the newly created request queue
> + * @ops: operations to be associated with @set
> + * @queue_depth: number of tags of @set
> + * @set_flags: flags of @set
> + *
> + * Description:
> + * @set is initialized using @ops, @queue_depth, @set_flags, and using only one
> + * hw_queue (SQ). Later on blk_mq_alloc_tag_set() is called to validate and/or
> + * adjust values of the tag set. blk_mq_init_queue() is called passing @set as
> + * argument, returning a new request queue with @set associated.
> + *
> + * Returns the newly created request queue on success, or ERR_PTR() on failure.
>    */
>   struct request_queue *blk_mq_init_sq_queue(struct blk_mq_tag_set *set,
>   					   const struct blk_mq_ops *ops,
>
Marcos Paulo de Souza April 16, 2019, 2:23 a.m. UTC | #2
On Sun, Apr 14, 2019 at 09:02:13PM +0000, Chaitanya Kulkarni wrote:
> On 4/13/19 8:11 PM, Marcos Paulo de Souza wrote:
> > Describing better what the function does, and what the arguments are
> > meant for.
> > 
> > Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> > ---
> >   block/blk-mq.c | 17 ++++++++++++++---
> >   1 file changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index 4a8277a54c03..fd0bf89b8a73 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -2675,9 +2675,20 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
> >   }
> >   EXPORT_SYMBOL(blk_mq_init_queue);
> >   
> > -/*
> > - * Helper for setting up a queue with mq ops, given queue depth, and
> > - * the passed in mq ops flags.
> > +/**
> Is following line beyond 80 columns ?

Actually it hit the limit of 80 columns.

> > + * blk_mq_init_sq_queue - Create a new request queue with a SQ queue and tag set
> It will be great if we describe what SQ in the above line, otherwise we 
> stating just obvious here.

You're right, I will change the "SQ" for "only one hw_queue (SQ)", to describe
what is the SQ.

> > + * @set: tag set to be associated by the newly created request queue
> > + * @ops: operations to be associated with @set
> > + * @queue_depth: number of tags of @set
> > + * @set_flags: flags of @set
> > + *
> > + * Description:
> > + * @set is initialized using @ops, @queue_depth, @set_flags, and using only one
> > + * hw_queue (SQ). Later on blk_mq_alloc_tag_set() is called to validate and/or
> > + * adjust values of the tag set. blk_mq_init_queue() is called passing @set as
> > + * argument, returning a new request queue with @set associated.
> > + *
> > + * Returns the newly created request queue on success, or ERR_PTR() on failure.
> >    */
> >   struct request_queue *blk_mq_init_sq_queue(struct blk_mq_tag_set *set,
> >   					   const struct blk_mq_ops *ops,
> > 
>
diff mbox series

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4a8277a54c03..fd0bf89b8a73 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2675,9 +2675,20 @@  struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
 }
 EXPORT_SYMBOL(blk_mq_init_queue);
 
-/*
- * Helper for setting up a queue with mq ops, given queue depth, and
- * the passed in mq ops flags.
+/**
+ * blk_mq_init_sq_queue - Create a new request queue with a SQ queue and tag set
+ * @set: tag set to be associated by the newly created request queue
+ * @ops: operations to be associated with @set
+ * @queue_depth: number of tags of @set
+ * @set_flags: flags of @set
+ *
+ * Description:
+ * @set is initialized using @ops, @queue_depth, @set_flags, and using only one
+ * hw_queue (SQ). Later on blk_mq_alloc_tag_set() is called to validate and/or
+ * adjust values of the tag set. blk_mq_init_queue() is called passing @set as
+ * argument, returning a new request queue with @set associated.
+ *
+ * Returns the newly created request queue on success, or ERR_PTR() on failure.
  */
 struct request_queue *blk_mq_init_sq_queue(struct blk_mq_tag_set *set,
 					   const struct blk_mq_ops *ops,