aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/linux/skbuff.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 70a3f8d49118..775292a66fa4 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -238,11 +238,12 @@ enum {
238/* 238/*
239 * The callback notifies userspace to release buffers when skb DMA is done in 239 * The callback notifies userspace to release buffers when skb DMA is done in
240 * lower device, the skb last reference should be 0 when calling this. 240 * lower device, the skb last reference should be 0 when calling this.
241 * The desc is used to track userspace buffer index. 241 * The ctx field is used to track device context.
242 * The desc field is used to track userspace buffer index.
242 */ 243 */
243struct ubuf_info { 244struct ubuf_info {
244 void (*callback)(void *); 245 void (*callback)(struct ubuf_info *);
245 void *arg; 246 void *ctx;
246 unsigned long desc; 247 unsigned long desc;
247}; 248};
248 249