blk-mq: Remove unnecessary local variable
diff mbox series

Message ID 37baa5f3d47675b782652c85acf303662368e99f.1593846844.git.baolin.wang7@gmail.com
State New
Headers show
Series
  • blk-mq: Remove unnecessary local variable
Related show

Commit Message

Baolin Wang July 4, 2020, 7:26 a.m. UTC
Remove unnecessary local variable 'ret' in blk_mq_dispatch_hctx_list().

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 block/blk-mq-sched.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Baolin Wang July 10, 2020, 8:22 a.m. UTC | #1
Hi,

On Sat, Jul 04, 2020 at 03:26:14PM +0800, Baolin Wang wrote:
> Remove unnecessary local variable 'ret' in blk_mq_dispatch_hctx_list().
>

A gentle ping?

> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
>  block/blk-mq-sched.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
> index 1c52e56a19b1..b8db72cf1043 100644
> --- a/block/blk-mq-sched.c
> +++ b/block/blk-mq-sched.c
> @@ -96,7 +96,6 @@ static bool blk_mq_dispatch_hctx_list(struct list_head *rq_list)
>  	struct request *rq;
>  	LIST_HEAD(hctx_list);
>  	unsigned int count = 0;
> -	bool ret;
>  
>  	list_for_each_entry(rq, rq_list, queuelist) {
>  		if (rq->mq_hctx != hctx) {
> @@ -108,8 +107,7 @@ static bool blk_mq_dispatch_hctx_list(struct list_head *rq_list)
>  	list_splice_tail_init(rq_list, &hctx_list);
>  
>  dispatch:
> -	ret = blk_mq_dispatch_rq_list(hctx, &hctx_list, count);
> -	return ret;
> +	return blk_mq_dispatch_rq_list(hctx, &hctx_list, count);
>  }
>  
>  #define BLK_MQ_BUDGET_DELAY	3		/* ms units */
> -- 
> 2.17.1
Ming Lei July 10, 2020, 9:45 a.m. UTC | #2
On Fri, Jul 10, 2020 at 04:22:10PM +0800, Baolin Wang wrote:
> Hi,
> 
> On Sat, Jul 04, 2020 at 03:26:14PM +0800, Baolin Wang wrote:
> > Remove unnecessary local variable 'ret' in blk_mq_dispatch_hctx_list().
> >
> 
> A gentle ping?

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Jens Axboe July 10, 2020, 1:59 p.m. UTC | #3
On 7/4/20 1:26 AM, Baolin Wang wrote:
> Remove unnecessary local variable 'ret' in blk_mq_dispatch_hctx_list().

Applied, thanks.

Patch
diff mbox series

diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 1c52e56a19b1..b8db72cf1043 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -96,7 +96,6 @@  static bool blk_mq_dispatch_hctx_list(struct list_head *rq_list)
 	struct request *rq;
 	LIST_HEAD(hctx_list);
 	unsigned int count = 0;
-	bool ret;
 
 	list_for_each_entry(rq, rq_list, queuelist) {
 		if (rq->mq_hctx != hctx) {
@@ -108,8 +107,7 @@  static bool blk_mq_dispatch_hctx_list(struct list_head *rq_list)
 	list_splice_tail_init(rq_list, &hctx_list);
 
 dispatch:
-	ret = blk_mq_dispatch_rq_list(hctx, &hctx_list, count);
-	return ret;
+	return blk_mq_dispatch_rq_list(hctx, &hctx_list, count);
 }
 
 #define BLK_MQ_BUDGET_DELAY	3		/* ms units */