mirror of
https://github.com/torvalds/linux.git
synced 2026-04-28 11:32:28 -04:00
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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
7221922da2
commit
c95e67bac4
@@ -116,11 +116,10 @@ static void virtio_gpu_get_capsets(struct virtio_gpu_device *vgdev,
|
||||
|
||||
int virtio_gpu_init(struct virtio_device *vdev, struct drm_device *dev)
|
||||
{
|
||||
static vq_callback_t *callbacks[] = {
|
||||
virtio_gpu_ctrl_ack, virtio_gpu_cursor_ack
|
||||
struct virtqueue_info vqs_info[] = {
|
||||
{ "control", virtio_gpu_ctrl_ack },
|
||||
{ "cursor", virtio_gpu_cursor_ack },
|
||||
};
|
||||
static const char * const names[] = { "control", "cursor" };
|
||||
|
||||
struct virtio_gpu_device *vgdev;
|
||||
/* this will expand later */
|
||||
struct virtqueue *vqs[2];
|
||||
@@ -207,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(vgdev->vdev, 2, vqs, callbacks, names, NULL);
|
||||
ret = virtio_find_vqs_info(vgdev->vdev, 2, vqs, vqs_info, NULL);
|
||||
if (ret) {
|
||||
DRM_ERROR("failed to find virt queues\n");
|
||||
goto err_vqs;
|
||||
|
||||
Reference in New Issue
Block a user