diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 23:50:05 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 23:50:05 +1100 |
commit | 15f9c8903cbdb02aee0f1bcf86a97c2e238b9a3d (patch) | |
tree | a215ccf3f745e52ae67aed1ac822baa57326b9b6 /drivers/virtio | |
parent | 0ad07ec1fd2f3e90dfb086b04c07a83db40e9172 (diff) | |
download | linux-15f9c8903cbdb02aee0f1bcf86a97c2e238b9a3d.tar.bz2 |
virtio: Use the sg_phys convenience function.
Simple cleanup.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 9859213aa658..74c245092b5c 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -99,16 +99,14 @@ static int vring_add_buf(struct virtqueue *_vq, head = vq->free_head; for (i = vq->free_head; out; i = vq->vring.desc[i].next, out--) { vq->vring.desc[i].flags = VRING_DESC_F_NEXT; - vq->vring.desc[i].addr = (page_to_pfn(sg_page(sg))<<PAGE_SHIFT) - + sg->offset; + vq->vring.desc[i].addr = sg_phys(sg); vq->vring.desc[i].len = sg->length; prev = i; sg++; } for (; in; i = vq->vring.desc[i].next, in--) { vq->vring.desc[i].flags = VRING_DESC_F_NEXT|VRING_DESC_F_WRITE; - vq->vring.desc[i].addr = (page_to_pfn(sg_page(sg))<<PAGE_SHIFT) - + sg->offset; + vq->vring.desc[i].addr = sg_phys(sg); vq->vring.desc[i].len = sg->length; prev = i; sg++; |