aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost/vhost.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-04-08 20:24:02 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-13 13:09:19 -0400
commitca8f4fb21d08747013cce9cf1840aa5bfc31f2d8 (patch)
treef18de0412ec64d7aa4a26ff85d0ad1c57263dbff /drivers/vhost/vhost.c
parent9a5d2bd99e0dfe9a31b3c160073ac445ba3d773f (diff)
skbuff: struct ubuf_info callback type safety
The skb struct ubuf_info callback gets passed struct ubuf_info itself, not the arg value as the field name and the function signature seem to imply. Rename the arg field to ctx to match usage, add documentation and change the callback argument type to make usage clear and to have compiler check correctness. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r--drivers/vhost/vhost.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 947f00d8e091..51e4c1eeec4f 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1598,10 +1598,9 @@ void vhost_ubuf_put_and_wait(struct vhost_ubuf_ref *ubufs)
1598 kfree(ubufs); 1598 kfree(ubufs);
1599} 1599}
1600 1600
1601void vhost_zerocopy_callback(void *arg) 1601void vhost_zerocopy_callback(struct ubuf_info *ubuf)
1602{ 1602{
1603 struct ubuf_info *ubuf = arg; 1603 struct vhost_ubuf_ref *ubufs = ubuf->ctx;
1604 struct vhost_ubuf_ref *ubufs = ubuf->arg;
1605 struct vhost_virtqueue *vq = ubufs->vq; 1604 struct vhost_virtqueue *vq = ubufs->vq;
1606 1605
1607 /* set len = 1 to mark this desc buffers done DMA */ 1606 /* set len = 1 to mark this desc buffers done DMA */