mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:46:16 +00:00
virtio: rename virtio_find_vqs_info() to virtio_find_vqs()
Since the original virtio_find_vqs() is no longer present, rename virtio_find_vqs_info() back to virtio_find_vqs(). Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240708074814.1739223-20-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
3e8d51c776
commit
6c85d6b653
@ -574,7 +574,7 @@ static int um_pci_init_vqs(struct um_pci_device *dev)
|
||||
struct virtqueue *vqs[2];
|
||||
int err, i;
|
||||
|
||||
err = virtio_find_vqs_info(dev->vdev, 2, vqs, vqs_info, NULL);
|
||||
err = virtio_find_vqs(dev->vdev, 2, vqs, vqs_info, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
}
|
||||
|
||||
/* Discover virtqueues and write information to configuration. */
|
||||
err = virtio_find_vqs_info(vdev, num_vqs, vqs, vqs_info, &desc);
|
||||
err = virtio_find_vqs(vdev, num_vqs, vqs, vqs_info, &desc);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
@ -284,8 +284,7 @@ static int virtbt_probe(struct virtio_device *vdev)
|
||||
|
||||
INIT_WORK(&vbt->rx, virtbt_rx_work);
|
||||
|
||||
err = virtio_find_vqs_info(vdev, VIRTBT_NUM_VQS, vbt->vqs,
|
||||
vqs_info, NULL);
|
||||
err = virtio_find_vqs(vdev, VIRTBT_NUM_VQS, vbt->vqs, vqs_info, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -1849,8 +1849,7 @@ static int init_vqs(struct ports_device *portdev)
|
||||
}
|
||||
}
|
||||
/* Find the queues. */
|
||||
err = virtio_find_vqs_info(portdev->vdev, nr_queues, vqs,
|
||||
vqs_info, NULL);
|
||||
err = virtio_find_vqs(portdev->vdev, nr_queues, vqs, vqs_info, NULL);
|
||||
if (err)
|
||||
goto free;
|
||||
|
||||
|
@ -129,7 +129,7 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi)
|
||||
vqs_info[i].name = vi->data_vq[i].name;
|
||||
}
|
||||
|
||||
ret = virtio_find_vqs_info(vi->vdev, total_vqs, vqs, vqs_info, NULL);
|
||||
ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, vqs_info, NULL);
|
||||
if (ret)
|
||||
goto err_find;
|
||||
|
||||
|
@ -829,7 +829,7 @@ static int scmi_vio_probe(struct virtio_device *vdev)
|
||||
if (have_vq_rx)
|
||||
channels[VIRTIO_SCMI_VQ_RX].is_rx = true;
|
||||
|
||||
ret = virtio_find_vqs_info(vdev, vq_cnt, vqs, scmi_vio_vqs_info, NULL);
|
||||
ret = virtio_find_vqs(vdev, vq_cnt, vqs, scmi_vio_vqs_info, NULL);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to get %d virtqueue(s)\n", vq_cnt);
|
||||
return ret;
|
||||
|
@ -464,8 +464,8 @@ static int virtio_gpio_alloc_vqs(struct virtio_gpio *vgpio,
|
||||
struct virtqueue *vqs[2] = { NULL, NULL };
|
||||
int ret;
|
||||
|
||||
ret = virtio_find_vqs_info(vdev, vgpio->irq_lines ? 2 : 1, vqs,
|
||||
vqs_info, NULL);
|
||||
ret = virtio_find_vqs(vdev, vgpio->irq_lines ? 2 : 1, vqs,
|
||||
vqs_info, NULL);
|
||||
if (ret) {
|
||||
dev_err(&vdev->dev, "failed to find vqs: %d\n", ret);
|
||||
return ret;
|
||||
|
@ -206,7 +206,7 @@ int virtio_gpu_init(struct virtio_device *vdev, struct drm_device *dev)
|
||||
DRM_INFO("features: %ccontext_init\n",
|
||||
vgdev->has_context_init ? '+' : '-');
|
||||
|
||||
ret = virtio_find_vqs_info(vgdev->vdev, 2, vqs, vqs_info, NULL);
|
||||
ret = virtio_find_vqs(vgdev->vdev, 2, vqs, vqs_info, NULL);
|
||||
if (ret) {
|
||||
DRM_ERROR("failed to find virt queues\n");
|
||||
goto err_vqs;
|
||||
|
@ -1089,8 +1089,8 @@ static int viommu_init_vqs(struct viommu_dev *viommu)
|
||||
{ "event", viommu_event_handler },
|
||||
};
|
||||
|
||||
return virtio_find_vqs_info(vdev, VIOMMU_NR_VQS, viommu->vqs,
|
||||
vqs_info, NULL);
|
||||
return virtio_find_vqs(vdev, VIOMMU_NR_VQS, viommu->vqs,
|
||||
vqs_info, NULL);
|
||||
}
|
||||
|
||||
static int viommu_fill_evtq(struct viommu_dev *viommu)
|
||||
|
@ -5339,7 +5339,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
|
||||
vqs_info[rxq2vq(i)].ctx = true;
|
||||
}
|
||||
|
||||
ret = virtio_find_vqs_info(vi->vdev, total_vqs, vqs, vqs_info, NULL);
|
||||
ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, vqs_info, NULL);
|
||||
if (ret)
|
||||
goto err_find;
|
||||
|
||||
|
@ -6579,8 +6579,8 @@ static int init_vqs(struct virtio_device *vdev)
|
||||
[HWSIM_VQ_RX] = { "rx", hwsim_virtio_rx_done },
|
||||
};
|
||||
|
||||
return virtio_find_vqs_info(vdev, HWSIM_NUM_VQS,
|
||||
hwsim_vqs, vqs_info, NULL);
|
||||
return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
|
||||
hwsim_vqs, vqs_info, NULL);
|
||||
}
|
||||
|
||||
static int fill_vq(struct virtqueue *vq)
|
||||
|
@ -893,7 +893,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
|
||||
init_waitqueue_head(&vrp->sendq);
|
||||
|
||||
/* We expect two virtqueues, rx and tx (and in this order) */
|
||||
err = virtio_find_vqs_info(vdev, 2, vqs, vqs_info, NULL);
|
||||
err = virtio_find_vqs(vdev, 2, vqs, vqs_info, NULL);
|
||||
if (err)
|
||||
goto free_vrp;
|
||||
|
||||
|
@ -879,7 +879,7 @@ static int virtscsi_init(struct virtio_device *vdev,
|
||||
vqs_info[i].name = "request_poll";
|
||||
|
||||
/* Discover virtqueues and write information to configuration. */
|
||||
err = virtio_find_vqs_info(vdev, num_vqs, vqs, vqs_info, &desc);
|
||||
err = virtio_find_vqs(vdev, num_vqs, vqs, vqs_info, &desc);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
@ -587,8 +587,8 @@ static int init_vqs(struct virtio_balloon *vb)
|
||||
vqs_info[VIRTIO_BALLOON_VQ_REPORTING].callback = balloon_ack;
|
||||
}
|
||||
|
||||
err = virtio_find_vqs_info(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
|
||||
vqs_info, NULL);
|
||||
err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
|
||||
vqs_info, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -192,7 +192,7 @@ static int virtinput_init_vqs(struct virtio_input *vi)
|
||||
struct virtqueue *vqs[2];
|
||||
int err;
|
||||
|
||||
err = virtio_find_vqs_info(vi->vdev, 2, vqs, vqs_info, NULL);
|
||||
err = virtio_find_vqs(vi->vdev, 2, vqs, vqs_info, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
vi->evt = vqs[0];
|
||||
|
@ -836,7 +836,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
|
||||
vqs_info[i].name = fs->vqs[i].name;
|
||||
}
|
||||
|
||||
ret = virtio_find_vqs_info(vdev, fs->nvqs, vqs, vqs_info, &desc);
|
||||
ret = virtio_find_vqs(vdev, fs->nvqs, vqs, vqs_info, &desc);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
|
@ -222,10 +222,10 @@ static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
|
||||
}
|
||||
|
||||
static inline
|
||||
int virtio_find_vqs_info(struct virtio_device *vdev, unsigned int nvqs,
|
||||
struct virtqueue *vqs[],
|
||||
struct virtqueue_info vqs_info[],
|
||||
struct irq_affinity *desc)
|
||||
int virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
|
||||
struct virtqueue *vqs[],
|
||||
struct virtqueue_info vqs_info[],
|
||||
struct irq_affinity *desc)
|
||||
{
|
||||
return vdev->config->find_vqs(vdev, nvqs, vqs, vqs_info, desc);
|
||||
}
|
||||
@ -238,7 +238,7 @@ struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
|
||||
{ n, c },
|
||||
};
|
||||
struct virtqueue *vq;
|
||||
int err = virtio_find_vqs_info(vdev, 1, &vq, vqs_info, NULL);
|
||||
int err = virtio_find_vqs(vdev, 1, &vq, vqs_info, NULL);
|
||||
|
||||
if (err < 0)
|
||||
return ERR_PTR(err);
|
||||
|
@ -624,8 +624,7 @@ static int virtio_vsock_vqs_init(struct virtio_vsock *vsock)
|
||||
};
|
||||
int ret;
|
||||
|
||||
ret = virtio_find_vqs_info(vdev, VSOCK_VQ_MAX, vsock->vqs, vqs_info,
|
||||
NULL);
|
||||
ret = virtio_find_vqs(vdev, VSOCK_VQ_MAX, vsock->vqs, vqs_info, NULL);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
@ -125,7 +125,7 @@ static int virtsnd_find_vqs(struct virtio_snd *snd)
|
||||
unsigned int n;
|
||||
int rc;
|
||||
|
||||
rc = virtio_find_vqs_info(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL);
|
||||
rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, vqs_info, NULL);
|
||||
if (rc) {
|
||||
dev_err(&vdev->dev, "failed to initialize virtqueues\n");
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user