aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-17 13:13:21 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-17 13:13:21 -0400
commit0741241c6b80bfd58417e95de984d60c9e9ef2a0 (patch)
tree9fa70e5e918e0735c531988f64b92cb5655baf28 /Documentation
parente36aa25a533962b08402530e8443ac804a454e27 (diff)
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')
-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 f688eba8770..50d5ce4899c 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -32,10 +32,8 @@ static char cn_test_name[] = "cn_test";
32static struct sock *nls; 32static struct sock *nls;
33static struct timer_list cn_test_timer; 33static struct timer_list cn_test_timer;
34 34
35void cn_test_callback(void *data) 35void cn_test_callback(struct cn_msg *msg)
36{ 36{
37 struct cn_msg *msg = (struct cn_msg *)data;
38
39 printk("%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n", 37 printk("%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n",
40 __func__, jiffies, msg->id.idx, msg->id.val, 38 __func__, jiffies, msg->id.idx, msg->id.val,
41 msg->seq, msg->ack, msg->len, (char *)msg->data); 39 msg->seq, msg->ack, msg->len, (char *)msg->data);