diff mbox series

[linux-next] block/rnbd-clt: Remove the unneeded result variable

Message ID 20220824075213.221397-1-ye.xingchen@zte.com.cn (mailing list archive)
State New, archived
Headers show
Series [linux-next] block/rnbd-clt: Remove the unneeded result variable | expand

Commit Message

CGEL Aug. 24, 2022, 7:52 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value from rtrs_clt_rdma_cq_direct() directly instead of
storing it in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/block/rnbd/rnbd-clt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jinpu Wang Aug. 24, 2022, 2:30 p.m. UTC | #1
On Wed, Aug 24, 2022 at 9:52 AM <cgel.zte@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value from rtrs_clt_rdma_cq_direct() directly instead of
> storing it in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn
Acked-by: Jack Wang <jinpu.wang@ionos.com>
thx!
> ---
>  drivers/block/rnbd/rnbd-clt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
> index 9d01e7ab33e4..78334da74d8b 100644
> --- a/drivers/block/rnbd/rnbd-clt.c
> +++ b/drivers/block/rnbd/rnbd-clt.c
> @@ -1159,10 +1159,8 @@ static int rnbd_rdma_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
>  {
>         struct rnbd_queue *q = hctx->driver_data;
>         struct rnbd_clt_dev *dev = q->dev;
> -       int cnt;
>
> -       cnt = rtrs_clt_rdma_cq_direct(dev->sess->rtrs, hctx->queue_num);
> -       return cnt;
> +       return rtrs_clt_rdma_cq_direct(dev->sess->rtrs, hctx->queue_num);
>  }
>
>  static void rnbd_rdma_map_queues(struct blk_mq_tag_set *set)
> --
> 2.25.1
Jens Axboe Aug. 24, 2022, 2:51 p.m. UTC | #2
On Wed, 24 Aug 2022 07:52:13 +0000, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value from rtrs_clt_rdma_cq_direct() directly instead of
> storing it in another redundant variable.
> 
> 

Applied, thanks!

[1/1] block/rnbd-clt: Remove the unneeded result variable
      commit: f2cc648e12285c53365c2bcacbcd919022f4d3a8

Best regards,
diff mbox series

Patch

diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index 9d01e7ab33e4..78334da74d8b 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -1159,10 +1159,8 @@  static int rnbd_rdma_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
 {
 	struct rnbd_queue *q = hctx->driver_data;
 	struct rnbd_clt_dev *dev = q->dev;
-	int cnt;
 
-	cnt = rtrs_clt_rdma_cq_direct(dev->sess->rtrs, hctx->queue_num);
-	return cnt;
+	return rtrs_clt_rdma_cq_direct(dev->sess->rtrs, hctx->queue_num);
 }
 
 static void rnbd_rdma_map_queues(struct blk_mq_tag_set *set)