[RFC PATCH 02/17] virtio-blk: Remove unused used length

From: Xie Yongji
Date: Mon May 17 2021 - 05:09:41 EST


The used length is not used. Let's drop it and
pass NULL to virtqueue_get_buf() instead.

Signed-off-by: Xie Yongji <xieyongji@xxxxxxxxxxxxx>
---
drivers/block/virtio_blk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 425bae618131..255adb7a768c 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -178,12 +178,11 @@ static void virtblk_done(struct virtqueue *vq)
int qid = vq->index;
struct virtblk_req *vbr;
unsigned long flags;
- unsigned int len;

spin_lock_irqsave(&vblk->vqs[qid].lock, flags);
do {
virtqueue_disable_cb(vq);
- while ((vbr = virtqueue_get_buf(vblk->vqs[qid].vq, &len)) != NULL) {
+ while ((vbr = virtqueue_get_buf(vblk->vqs[qid].vq, NULL)) != NULL) {
struct request *req = blk_mq_rq_from_pdu(vbr);

if (likely(!blk_should_fake_timeout(req->q)))
--
2.11.0