summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2024-07-08 10:48:12 +0300
committerMichael S. Tsirkin <mst@redhat.com>2024-07-17 12:20:58 +0300
commitc95e67bac42d7e671e6a2c14548b6a7f76e71235 (patch)
treef0fc2e0608f068a3f99dd700850554baa968a4f5 /drivers/iommu
parent7221922da2a1eb8bbc8d6570cec1197c8f484517 (diff)
downloadlinux-c95e67bac42d7e671e6a2c14548b6a7f76e71235.tar.xz
virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info()
Instead of passing separate names and callbacks arrays to virtio_find_vqs(), have one of virtual_queue_info structs and pass it to virtio_find_vqs_info(). Suggested-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240708074814.1739223-18-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/virtio-iommu.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 36d680826b57..d3c7877a3806 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -1084,14 +1084,13 @@ static struct iommu_ops viommu_ops = {
static int viommu_init_vqs(struct viommu_dev *viommu)
{
struct virtio_device *vdev = dev_to_virtio(viommu->dev);
- const char *names[] = { "request", "event" };
- vq_callback_t *callbacks[] = {
- NULL, /* No async requests */
- viommu_event_handler,
+ struct virtqueue_info vqs_info[] = {
+ { "request" },
+ { "event", viommu_event_handler },
};
- return virtio_find_vqs(vdev, VIOMMU_NR_VQS, viommu->vqs, callbacks,
- names, NULL);
+ return virtio_find_vqs_info(vdev, VIOMMU_NR_VQS, viommu->vqs,
+ vqs_info, NULL);
}
static int viommu_fill_evtq(struct viommu_dev *viommu)