Skip to content

Commit 959538c

Browse files
Jiri Pirkomstsirkin
authored andcommitted
virtio: make virtio_find_single_vq() call virtio_find_vqs()
In order to prepare for conversion of virtio_find_vqs*() arguments, make virtio_find_single_vq() to call virtio_find_vqs() instead of op directly. Signed-off-by: Jiri Pirko <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent de1177e commit 959538c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

include/linux/virtio_config.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -210,20 +210,6 @@ static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev)
210210
return !virtio_has_feature(vdev, VIRTIO_F_ACCESS_PLATFORM);
211211
}
212212

213-
static inline
214-
struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
215-
vq_callback_t *c, const char *n)
216-
{
217-
vq_callback_t *callbacks[] = { c };
218-
const char *names[] = { n };
219-
struct virtqueue *vq;
220-
int err = vdev->config->find_vqs(vdev, 1, &vq, callbacks, names, NULL,
221-
NULL);
222-
if (err < 0)
223-
return ERR_PTR(err);
224-
return vq;
225-
}
226-
227213
static inline
228214
int virtio_find_vqs_ctx(struct virtio_device *vdev, unsigned nvqs,
229215
struct virtqueue *vqs[], vq_callback_t *callbacks[],
@@ -244,6 +230,20 @@ int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
244230
names, NULL, desc);
245231
}
246232

233+
static inline
234+
struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
235+
vq_callback_t *c, const char *n)
236+
{
237+
vq_callback_t *callbacks[] = { c };
238+
const char *names[] = { n };
239+
struct virtqueue *vq;
240+
int err = virtio_find_vqs(vdev, 1, &vq, callbacks, names, NULL);
241+
242+
if (err < 0)
243+
return ERR_PTR(err);
244+
return vq;
245+
}
246+
247247
/**
248248
* virtio_synchronize_cbs - synchronize with virtqueue callbacks
249249
* @dev: the virtio device

0 commit comments

Comments
 (0)