[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1607428671-4802-1-git-send-email-liush@allwinnertech.com>
Date: Tue, 8 Dec 2020 19:57:51 +0800
From: liush <liush@...winnertech.com>
To: mst@...hat.com, jasowang@...hat.com
Cc: virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, liush <liush@...winnertech.com>
Subject: [PATCH] virtio: replace constant parameter '1' with num
'num' can represent the value of out_sgs(in_sags), no need to pass
in constant parameters in 'virtqueue_add'.
Signed-off-by: liush <liush@...winnertech.com>
---
drivers/virtio/virtio_ring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index becc776..7583f8b 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -1760,7 +1760,7 @@ int virtqueue_add_outbuf(struct virtqueue *vq,
void *data,
gfp_t gfp)
{
- return virtqueue_add(vq, &sg, num, 1, 0, data, NULL, gfp);
+ return virtqueue_add(vq, &sg, num, num, 0, data, NULL, gfp);
}
EXPORT_SYMBOL_GPL(virtqueue_add_outbuf);
@@ -1782,7 +1782,7 @@ int virtqueue_add_inbuf(struct virtqueue *vq,
void *data,
gfp_t gfp)
{
- return virtqueue_add(vq, &sg, num, 0, 1, data, NULL, gfp);
+ return virtqueue_add(vq, &sg, num, 0, num, data, NULL, gfp);
}
EXPORT_SYMBOL_GPL(virtqueue_add_inbuf);
--
2.7.4
Powered by blists - more mailing lists