summaryrefslogtreecommitdiff
path: root/Documentation/connector
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-17 21:13:21 +0400
committerDavid S. Miller <davem@davemloft.net>2009-07-17 21:13:21 +0400
commit0741241c6b80bfd58417e95de984d60c9e9ef2a0 (patch)
tree9fa70e5e918e0735c531988f64b92cb5655baf28 /Documentation/connector
parente36aa25a533962b08402530e8443ac804a454e27 (diff)
downloadlinux-0741241c6b80bfd58417e95de984d60c9e9ef2a0.tar.xz
connector: make callback argument type explicit
The connector documentation states that the argument to the callback function is always a pointer to a struct cn_msg, but rather than encode it in the API itself, it uses a void pointer everywhere. This doesn't make much sense to encode the pointer in documentation as it prevents proper C type checking from occurring and can easily allow people to use the wrong pointer type. So convert the argument type to an explicit struct cn_msg pointer. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/connector')
-rw-r--r--Documentation/connector/cn_test.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index f688eba87704..50d5ce4899c8 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -32,10 +32,8 @@ static char cn_test_name[] = "cn_test";
static struct sock *nls;
static struct timer_list cn_test_timer;
-void cn_test_callback(void *data)
+void cn_test_callback(struct cn_msg *msg)
{
- struct cn_msg *msg = (struct cn_msg *)data;
-
printk("%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n",
__func__, jiffies, msg->id.idx, msg->id.val,
msg->seq, msg->ack, msg->len, (char *)msg->data);