[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210517090836.533-15-xieyongji@bytedance.com>
Date: Mon, 17 May 2021 17:08:33 +0800
From: Xie Yongji <xieyongji@...edance.com>
To: mst@...hat.com, jasowang@...hat.com, stefanha@...hat.com
Cc: amit@...nel.org, arei.gonglei@...wei.com, airlied@...ux.ie,
kraxel@...hat.com, dan.j.williams@...el.com,
johannes@...solutions.net, ohad@...ery.com,
bjorn.andersson@...aro.org, david@...hat.com, vgoyal@...hat.com,
miklos@...redi.hu, sgarzare@...hat.com,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 14/17] virtio_mem: Remove unused used length
The used length is not used. Let's drop it and
pass NULL to virtqueue_get_buf() instead.
Signed-off-by: Xie Yongji <xieyongji@...edance.com>
---
drivers/virtio/virtio_mem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 10ec60d81e84..32a8e359a5c3 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -1256,7 +1256,6 @@ static uint64_t virtio_mem_send_request(struct virtio_mem *vm,
const struct virtio_mem_req *req)
{
struct scatterlist *sgs[2], sg_req, sg_resp;
- unsigned int len;
int rc;
/* don't use the request residing on the stack (vaddr) */
@@ -1277,7 +1276,7 @@ static uint64_t virtio_mem_send_request(struct virtio_mem *vm,
virtqueue_kick(vm->vq);
/* wait for a response */
- wait_event(vm->host_resp, virtqueue_get_buf(vm->vq, &len));
+ wait_event(vm->host_resp, virtqueue_get_buf(vm->vq, NULL));
return virtio16_to_cpu(vm->vdev, vm->resp.type);
}
--
2.11.0
Powered by blists - more mailing lists