aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorJonah Palmer <jonah.palmer@oracle.com>2022-04-01 09:23:18 -0400
committerMichael S. Tsirkin <mst@redhat.com>2022-05-16 04:38:40 -0400
commit3857cd5c7ffd0bcc49bd2b66654af0909c847d02 (patch)
treea5d86e6d1e9b123f17d7ff1399cc05f0a8aa3df0 /hw/block
parent503e355465ba0eafad49c2e174995d2e234ed288 (diff)
downloadqemu-3857cd5c7ffd0bcc49bd2b66654af0909c847d02.zip
qemu-3857cd5c7ffd0bcc49bd2b66654af0909c847d02.tar.gz
qemu-3857cd5c7ffd0bcc49bd2b66654af0909c847d02.tar.bz2
virtio: drop name parameter for virtio_init()
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch lets us do this and removes the need for the name parameter in the virtio_init function. Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com> Message-Id: <1648819405-25696-2-git-send-email-jonah.palmer@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/vhost-user-blk.c2
-rw-r--r--hw/block/virtio-blk.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 1a42ae9..e8cb170 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -491,7 +491,7 @@ static void vhost_user_blk_device_realize(DeviceState *dev, Error **errp)
return;
}
- virtio_init(vdev, "virtio-blk", VIRTIO_ID_BLOCK,
+ virtio_init(vdev, VIRTIO_ID_BLOCK,
sizeof(struct virtio_blk_config));
s->virtqs = g_new(VirtQueue *, s->num_queues);
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 6a1cc41..cd80479 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -1206,7 +1206,7 @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
virtio_blk_set_config_size(s, s->host_features);
- virtio_init(vdev, "virtio-blk", VIRTIO_ID_BLOCK, s->config_size);
+ virtio_init(vdev, VIRTIO_ID_BLOCK, s->config_size);
s->blk = conf->conf.blk;
s->rq = NULL;