Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=15f9c8903cbdb02aee0f1bcf86a97c2e238b9a3d
Commit:     15f9c8903cbdb02aee0f1bcf86a97c2e238b9a3d
Parent:     0ad07ec1fd2f3e90dfb086b04c07a83db40e9172
Author:     Rusty Russell <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 23:50:05 2008 -0500
Committer:  Rusty Russell <[EMAIL PROTECTED]>
CommitDate: Mon Feb 4 23:50:05 2008 +1100

    virtio: Use the sg_phys convenience function.
    
    Simple cleanup.
    
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
---
 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 9859213..74c2450 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++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to