Skip to content

Commit

Permalink
virtio: remove obsolete virtqueue_get_queue_index()
Browse files Browse the repository at this point in the history
You can access it directly now, since 3.8: v3.7-rc1-13-g06ca287
'virtio: move queue_index and num_free fields into core struct
virtqueue.'

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rusty Russell authored and David S. Miller committed Mar 22, 2013
1 parent 6b0c21c commit 9d0ca6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ struct padded_vnet_hdr {
*/
static int vq2txq(struct virtqueue *vq)
{
return (virtqueue_get_queue_index(vq) - 1) / 2;
return (vq->index - 1) / 2;
}

static int txq2vq(int txq)
Expand All @@ -164,7 +164,7 @@ static int txq2vq(int txq)

static int vq2rxq(struct virtqueue *vq)
{
return virtqueue_get_queue_index(vq) / 2;
return vq->index / 2;
}

static int rxq2vq(int rxq)
Expand Down
6 changes: 3 additions & 3 deletions drivers/s390/kvm/virtio_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static void virtio_ccw_kvm_notify(struct virtqueue *vq)

vcdev = to_vc_device(info->vq->vdev);
ccw_device_get_schid(vcdev->cdev, &schid);
do_kvm_notify(schid, virtqueue_get_queue_index(vq));
do_kvm_notify(schid, vq->index);
}

static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev,
Expand All @@ -188,7 +188,7 @@ static void virtio_ccw_del_vq(struct virtqueue *vq, struct ccw1 *ccw)
unsigned long flags;
unsigned long size;
int ret;
unsigned int index = virtqueue_get_queue_index(vq);
unsigned int index = vq->index;

/* Remove from our list. */
spin_lock_irqsave(&vcdev->lock, flags);
Expand Down Expand Up @@ -610,7 +610,7 @@ static struct virtqueue *virtio_ccw_vq_by_ind(struct virtio_ccw_device *vcdev,
vq = NULL;
spin_lock_irqsave(&vcdev->lock, flags);
list_for_each_entry(info, &vcdev->virtqueues, node) {
if (virtqueue_get_queue_index(info->vq) == index) {
if (info->vq->index == index) {
vq = info->vq;
break;
}
Expand Down
6 changes: 0 additions & 6 deletions include/linux/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq);

unsigned int virtqueue_get_vring_size(struct virtqueue *vq);

/* FIXME: Obsolete accessor, but required for virtio_net merge. */
static inline unsigned int virtqueue_get_queue_index(struct virtqueue *vq)
{
return vq->index;
}

/**
* virtio_device - representation of a device using virtio
* @index: unique position on the virtio bus
Expand Down

0 comments on commit 9d0ca6e

Please sign in to comment.