mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 21:40:49 +00:00
virtio: drop duplicate virtio_queue_get_id() function
The virtio_queue_get_id() function is the lesser used duplicate of virtio_get_queue_index(). Use the latter instead. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1463767461-17922-1-git-send-email-stefanha@redhat.com
This commit is contained in:
parent
ef8875b549
commit
3a90c4ace2
@ -185,7 +185,7 @@ static void virtio_scsi_save_request(QEMUFile *f, SCSIRequest *sreq)
|
||||
{
|
||||
VirtIOSCSIReq *req = sreq->hba_private;
|
||||
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(req->dev);
|
||||
uint32_t n = virtio_queue_get_id(req->vq) - 2;
|
||||
uint32_t n = virtio_get_queue_index(req->vq) - 2;
|
||||
|
||||
assert(n < vs->conf.num_queues);
|
||||
qemu_put_be32s(f, &n);
|
||||
|
@ -1062,13 +1062,6 @@ int virtio_get_num_queues(VirtIODevice *vdev)
|
||||
return i;
|
||||
}
|
||||
|
||||
int virtio_queue_get_id(VirtQueue *vq)
|
||||
{
|
||||
VirtIODevice *vdev = vq->vdev;
|
||||
assert(vq >= &vdev->vq[0] && vq < &vdev->vq[VIRTIO_QUEUE_MAX]);
|
||||
return vq - &vdev->vq[0];
|
||||
}
|
||||
|
||||
void virtio_queue_set_align(VirtIODevice *vdev, int n, int align)
|
||||
{
|
||||
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
|
||||
|
@ -243,7 +243,6 @@ void virtio_queue_set_last_avail_idx(VirtIODevice *vdev, int n, uint16_t idx);
|
||||
void virtio_queue_invalidate_signalled_used(VirtIODevice *vdev, int n);
|
||||
VirtQueue *virtio_get_queue(VirtIODevice *vdev, int n);
|
||||
uint16_t virtio_get_queue_index(VirtQueue *vq);
|
||||
int virtio_queue_get_id(VirtQueue *vq);
|
||||
EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq);
|
||||
void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign,
|
||||
bool with_irqfd);
|
||||
|
Loading…
Reference in New Issue
Block a user