diff options
author | Jiri Pirko <jiri@nvidia.com> | 2024-07-08 09:47:56 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-17 11:20:56 +0200 |
commit | 87bb477c39b172071a1cb44aef41e701d5fee90d (patch) | |
tree | b47a46bfb964f22202717df5f2d0658d0cf25aeb /drivers/net/caif/caif_virtio.c | |
parent | vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready() (diff) | |
download | linux-87bb477c39b172071a1cb44aef41e701d5fee90d.tar.xz linux-87bb477c39b172071a1cb44aef41e701d5fee90d.zip |
caif_virtio: use virtio_find_single_vq() for single virtqueue finding
Since caif uses only one queue, convert to virtio_find_single_vq()
helper which is made for this purpose.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Message-Id: <20240708074814.1739223-2-jiri@resnulli.us>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/net/caif/caif_virtio.c')
-rw-r--r-- | drivers/net/caif/caif_virtio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c index 99d984851fef..7fea00c7ca8a 100644 --- a/drivers/net/caif/caif_virtio.c +++ b/drivers/net/caif/caif_virtio.c @@ -646,9 +646,7 @@ static inline void debugfs_init(struct cfv_info *cfv) /* Setup CAIF for the a virtio device */ static int cfv_probe(struct virtio_device *vdev) { - vq_callback_t *vq_cbs = cfv_release_cb; vrh_callback_t *vrh_cbs = cfv_recv; - const char *names = "output"; const char *cfv_netdev_name = "cfvrt"; struct net_device *netdev; struct cfv_info *cfv; @@ -675,9 +673,11 @@ static int cfv_probe(struct virtio_device *vdev) goto err; /* Get the TX virtio ring. This is a "guest side vring". */ - err = virtio_find_vqs(vdev, 1, &cfv->vq_tx, &vq_cbs, &names, NULL); - if (err) + cfv->vq_tx = virtio_find_single_vq(vdev, cfv_release_cb, "output"); + if (IS_ERR(cfv->vq_tx)) { + err = PTR_ERR(cfv->vq_tx); goto err; + } /* Get the CAIF configuration from virtio config space, if available */ if (vdev->config->get) { |