search for: foreach_sg

Displaying 2 results from an estimated 2 matches for "foreach_sg".

Did you mean: for_each_sg
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...tio_ring.c index ffd7e7d..277021b 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -119,13 +119,18 @@ struct vring_virtqueue #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) +/* This doesn't have the counter that for_each_sg() has */ +#define foreach_sg(sglist, i) \ + for (i = (sglist); i; i = sg_next(i)) + /* Set up an indirect table of descriptors and add it to the queue. */ static int vring_add_indirect(struct vring_virtqueue *vq, - struct scatterlist sg[], - unsigned int out, - unsigned int in, + unsigned in...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...tio_ring.c index ffd7e7d..277021b 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -119,13 +119,18 @@ struct vring_virtqueue #define to_vvq(_vq) container_of(_vq, struct vring_virtqueue, vq) +/* This doesn't have the counter that for_each_sg() has */ +#define foreach_sg(sglist, i) \ + for (i = (sglist); i; i = sg_next(i)) + /* Set up an indirect table of descriptors and add it to the queue. */ static int vring_add_indirect(struct vring_virtqueue *vq, - struct scatterlist sg[], - unsigned int out, - unsigned int in, + unsigned in...