[RFC PATCH 06/17] caif_virtio: Remove unused used length

From: Xie Yongji
Date: Mon May 17 2021 - 05:09:51 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/net/caif/caif_virtio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 106f089eb2a8..020ce35c2d65 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -165,12 +165,11 @@ static void cfv_release_used_buf(struct virtqueue *vq_tx)
BUG_ON(vq_tx != cfv->vq_tx);

for (;;) {
- unsigned int len;
struct buf_info *buf_info;

/* Get used buffer from used ring to recycle used descriptors */
spin_lock_irqsave(&cfv->tx_lock, flags);
- buf_info = virtqueue_get_buf(vq_tx, &len);
+ buf_info = virtqueue_get_buf(vq_tx, NULL);
spin_unlock_irqrestore(&cfv->tx_lock, flags);

/* Stop looping if there are no more buffers to free */
--
2.11.0