linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -tip] Documentation/connector/cn_test.c remove unused cn_test_want_notify()
@ 2009-05-20  5:34 Jaswinder Singh Rajput
  2009-05-20  7:22 ` Evgeniy Polyakov
  0 siblings, 1 reply; 5+ messages in thread
From: Jaswinder Singh Rajput @ 2009-05-20  5:34 UTC (permalink / raw)
  To: Ingo Molnar, Evgeniy Polyakov, Andrew Morton, David Miller,
	x86 maintainers, LKML


Currently cn_test_want_notify() is not having any user.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 Documentation/connector/cn_test.c |   77 -------------------------------------
 1 files changed, 0 insertions(+), 77 deletions(-)

diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index 6977c17..e12d9d7 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -41,83 +41,6 @@ void cn_test_callback(void *data)
 	       msg->seq, msg->ack, msg->len, (char *)msg->data);
 }
 
-static int cn_test_want_notify(void)
-{
-	struct cn_ctl_msg *ctl;
-	struct cn_notify_req *req;
-	struct cn_msg *msg = NULL;
-	int size, size0;
-	struct sk_buff *skb;
-	struct nlmsghdr *nlh;
-	u32 group = 1;
-
-	size0 = sizeof(*msg) + sizeof(*ctl) + 3 * sizeof(*req);
-
-	size = NLMSG_SPACE(size0);
-
-	skb = alloc_skb(size, GFP_ATOMIC);
-	if (!skb) {
-		printk(KERN_ERR "Failed to allocate new skb with size=%u.\n",
-		       size);
-
-		return -ENOMEM;
-	}
-
-	nlh = NLMSG_PUT(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh));
-
-	msg = (struct cn_msg *)NLMSG_DATA(nlh);
-
-	memset(msg, 0, size0);
-
-	msg->id.idx = -1;
-	msg->id.val = -1;
-	msg->seq = 0x123;
-	msg->ack = 0x345;
-	msg->len = size0 - sizeof(*msg);
-
-	ctl = (struct cn_ctl_msg *)(msg + 1);
-
-	ctl->idx_notify_num = 1;
-	ctl->val_notify_num = 2;
-	ctl->group = group;
-	ctl->len = msg->len - sizeof(*ctl);
-
-	req = (struct cn_notify_req *)(ctl + 1);
-
-	/*
-	 * Idx.
-	 */
-	req->first = cn_test_id.idx;
-	req->range = 10;
-
-	/*
-	 * Val 0.
-	 */
-	req++;
-	req->first = cn_test_id.val;
-	req->range = 10;
-
-	/*
-	 * Val 1.
-	 */
-	req++;
-	req->first = cn_test_id.val + 20;
-	req->range = 10;
-
-	NETLINK_CB(skb).dst_group = ctl->group;
-	//netlink_broadcast(nls, skb, 0, ctl->group, GFP_ATOMIC);
-	netlink_unicast(nls, skb, 0, 0);
-
-	printk(KERN_INFO "Request was sent. Group=0x%x.\n", ctl->group);
-
-	return 0;
-
-nlmsg_failure:
-	printk(KERN_ERR "Failed to send %u.%u\n", msg->seq, msg->ack);
-	kfree_skb(skb);
-	return -EINVAL;
-}
-
 static u32 cn_test_timer_counter;
 static void cn_test_timer_func(unsigned long __data)
 {
-- 
1.6.1.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-27  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20  5:34 [PATCH -tip] Documentation/connector/cn_test.c remove unused cn_test_want_notify() Jaswinder Singh Rajput
2009-05-20  7:22 ` Evgeniy Polyakov
2009-05-20  7:42   ` Jaswinder Singh Rajput
2009-05-20  9:27     ` Evgeniy Polyakov
2009-05-27  8:37     ` Jaswinder Singh Rajput

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).