[RFC PATCH 10/17] rpmsg: virtio: Remove unused used length
From: Xie Yongji
Date: Mon May 17 2021 - 05:12:18 EST
The used length is not used in some cases. Let's drop it
and pass NULL to virtqueue_get_buf() instead.
Signed-off-by: Xie Yongji <xieyongji@xxxxxxxxxxxxx>
---
drivers/rpmsg/virtio_rpmsg_bus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index e87d4cf926eb..10df8bc0c3e1 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -437,7 +437,6 @@ static struct rpmsg_device *__rpmsg_create_channel(struct virtproc_info *vrp,
/* super simple buffer "allocator" that is just enough for now */
static void *get_a_tx_buf(struct virtproc_info *vrp)
{
- unsigned int len;
void *ret;
/* support multiple concurrent senders */
@@ -451,7 +450,7 @@ static void *get_a_tx_buf(struct virtproc_info *vrp)
ret = vrp->sbufs + vrp->buf_size * vrp->last_sbuf++;
/* or recycle a used one */
else
- ret = virtqueue_get_buf(vrp->svq, &len);
+ ret = virtqueue_get_buf(vrp->svq, NULL);
mutex_unlock(&vrp->tx_lock);
--
2.11.0