Messages in this thread Patch in this message | | | From | Xie Yongji <> | Subject | [RFC PATCH 13/17] virtio_input: Remove unused used length | Date | Mon, 17 May 2021 17:08:32 +0800 |
| |
The used length is not used. Let's drop it and pass NULL to virtqueue_get_buf() instead.
Signed-off-by: Xie Yongji <xieyongji@bytedance.com> --- drivers/virtio/virtio_input.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c index ce51ae165943..f83f8e556fba 100644 --- a/drivers/virtio/virtio_input.c +++ b/drivers/virtio/virtio_input.c @@ -35,11 +35,10 @@ static void virtinput_recv_events(struct virtqueue *vq) struct virtio_input *vi = vq->vdev->priv; struct virtio_input_event *event; unsigned long flags; - unsigned int len; spin_lock_irqsave(&vi->lock, flags); if (vi->ready) { - while ((event = virtqueue_get_buf(vi->evt, &len)) != NULL) { + while ((event = virtqueue_get_buf(vi->evt, NULL)) != NULL) { spin_unlock_irqrestore(&vi->lock, flags); input_event(vi->idev, le16_to_cpu(event->type), @@ -108,10 +107,9 @@ static void virtinput_recv_status(struct virtqueue *vq) struct virtio_input *vi = vq->vdev->priv; struct virtio_input_event *stsbuf; unsigned long flags; - unsigned int len; spin_lock_irqsave(&vi->lock, flags); - while ((stsbuf = virtqueue_get_buf(vi->sts, &len)) != NULL) + while ((stsbuf = virtqueue_get_buf(vi->sts, NULL)) != NULL) kfree(stsbuf); spin_unlock_irqrestore(&vi->lock, flags); } -- 2.11.0
| |