aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.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/net.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/net.c')
-rw-r--r--drivers/vhost/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index f0da2c32fbd..1f21d2a1e52 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -238,7 +238,7 @@ static void handle_tx(struct vhost_net *net)
238 238
239 vq->heads[vq->upend_idx].len = len; 239 vq->heads[vq->upend_idx].len = len;
240 ubuf->callback = vhost_zerocopy_callback; 240 ubuf->callback = vhost_zerocopy_callback;
241 ubuf->arg = vq->ubufs; 241 ubuf->ctx = vq->ubufs;
242 ubuf->desc = vq->upend_idx; 242 ubuf->desc = vq->upend_idx;
243 msg.msg_control = ubuf; 243 msg.msg_control = ubuf;
244 msg.msg_controllen = sizeof(ubuf); 244 msg.msg_controllen = sizeof(ubuf);