]> git.baikalelectronics.ru Git - kernel.git/commitdiff
block/rnbd-clt: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Wed, 24 Aug 2022 07:52:13 +0000 (07:52 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Aug 2022 14:50:44 +0000 (08:50 -0600)
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>
Link: https://lore.kernel.org/r/20220824075213.221397-1-ye.xingchen@zte.com.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt.c

index 9d01e7ab33e4b081fde6b9c73a45cd5741671031..78334da74d8bf90dcfd1f51d5ccd26f71a289a0c 100644 (file)
@@ -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)