summaryrefslogtreecommitdiff
path: root/arch/um
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2024-07-08 09:48:01 +0200
committerMichael S. Tsirkin <mst@redhat.com>2024-07-17 05:20:57 -0400
commit3c93b576e038577490e8b906025e38b6fd7241b3 (patch)
tree2a3a97b2445d0720a213442f26dce2fa6f0a75b9 /arch/um
parentad9a12576bccd4cf1bbef7f8574421804cdff403 (diff)
virtio: convert find_vqs() op implementations to find_vqs_info()
Convert existing find_vqs() transport implementations to use find_vqs_info() config op. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240708074814.1739223-7-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/virtio_uml.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c
index 77faa2cf3a13..4cc393e903fc 100644
--- a/arch/um/drivers/virtio_uml.c
+++ b/arch/um/drivers/virtio_uml.c
@@ -1014,8 +1014,8 @@ error_kzalloc:
}
static int vu_find_vqs(struct virtio_device *vdev, unsigned nvqs,
- struct virtqueue *vqs[], vq_callback_t *callbacks[],
- const char * const names[], const bool *ctx,
+ struct virtqueue *vqs[],
+ struct virtqueue_info vqs_info[],
struct irq_affinity *desc)
{
struct virtio_uml_device *vu_dev = to_virtio_uml_device(vdev);
@@ -1031,13 +1031,15 @@ static int vu_find_vqs(struct virtio_device *vdev, unsigned nvqs,
return rc;
for (i = 0; i < nvqs; ++i) {
- if (!names[i]) {
+ struct virtqueue_info *vqi = &vqs_info[i];
+
+ if (!vqi->name) {
vqs[i] = NULL;
continue;
}
- vqs[i] = vu_setup_vq(vdev, queue_idx++, callbacks[i], names[i],
- ctx ? ctx[i] : false);
+ vqs[i] = vu_setup_vq(vdev, queue_idx++, vqi->callback,
+ vqi->name, vqi->ctx);
if (IS_ERR(vqs[i])) {
rc = PTR_ERR(vqs[i]);
goto error_setup;
@@ -1097,7 +1099,7 @@ static const struct virtio_config_ops virtio_uml_config_ops = {
.get_status = vu_get_status,
.set_status = vu_set_status,
.reset = vu_reset,
- .find_vqs = vu_find_vqs,
+ .find_vqs_info = vu_find_vqs,
.del_vqs = vu_del_vqs,
.get_features = vu_get_features,
.finalize_features = vu_finalize_features,