Skip to contentSkip to conversation

cleanup 3rd argument in netlink_sendskb

PATCH Applied Denis V. Lunev 2 participants 2 messages Oct 5, 2007 – Oct 11, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 cleanup 3rd argument in netlink_sendskb

netlink_sendskb does not use third argument. Clean it and save a couple of bytes.

include/linux/netlink.h renamed from include/linux/netlink.h.nlk5 +1 -1
@@ -194,7 +194,7 @@ struct sock *netlink_getsockbyfilp(struc
 int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
 		long timeo, struct sock *ssk);
 void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
-int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol);
+int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
 
 /*
  *	skb should fit one page. This choice is good for headerless malloc.
ipc/mqueue.c renamed from ipc/mqueue.c.nlk5 +2 -3
@@ -521,8 +521,7 @@ static void __do_notify(struct mqueue_in
 			break;
 		case SIGEV_THREAD:
 			set_cookie(info->notify_cookie, NOTIFY_WOKENUP);
-			netlink_sendskb(info->notify_sock,
-					info->notify_cookie, 0);
+			netlink_sendskb(info->notify_sock, info->notify_cookie);
 			break;
 		}
 		/* after notification unregisters process */
@@ -568,7 +567,7 @@ static void remove_notification(struct m
 	if (info->notify_owner != NULL &&
 	    info->notify.sigev_notify == SIGEV_THREAD) {
 		set_cookie(info->notify_cookie, NOTIFY_REMOVED);
-		netlink_sendskb(info->notify_sock, info->notify_cookie, 0);
+		netlink_sendskb(info->notify_sock, info->notify_cookie);
 	}
 	put_pid(info->notify_owner);
 	info->notify_owner = NULL;
net/netlink/af_netlink.c renamed from net/netlink/af_netlink.c.nlk5 +2 -2
@@ -796,7 +796,7 @@ int netlink_attachskb(struct sock *sk, s
 	return 0;
 }
 
-int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol)
+int netlink_sendskb(struct sock *sk, struct sk_buff *skb)
 {
 	int len = skb->len;
 
@@ -858,7 +858,7 @@ retry:
 	if (err)
 		return err;
 
-	return netlink_sendskb(sk, skb, ssk->sk_protocol);
+	return netlink_sendskb(sk, skb);
 }
 
 int netlink_has_listeners(struct sock *sk, unsigned int group)