Skip to content

Commit 7ee015e

Browse files
dlunevdavem330
authored andcommitted
[NET]: cleanup 3rd argument in netlink_sendskb
netlink_sendskb does not use third argument. Clean it and save a couple of bytes. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3b71535 commit 7ee015e

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎include/linux/netlink.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ struct sock *netlink_getsockbyfilp(struct file *filp);
194194
int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
195195
long timeo, struct sock *ssk);
196196
void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
197-
int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol);
197+
int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
198198

199199
/*
200200
* skb should fit one page. This choice is good for headerless malloc.

‎ipc/mqueue.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,7 @@ static void __do_notify(struct mqueue_inode_info *info)
521521
break;
522522
case SIGEV_THREAD:
523523
set_cookie(info->notify_cookie, NOTIFY_WOKENUP);
524-
netlink_sendskb(info->notify_sock,
525-
info->notify_cookie, 0);
524+
netlink_sendskb(info->notify_sock, info->notify_cookie);
526525
break;
527526
}
528527
/* after notification unregisters process */
@@ -568,7 +567,7 @@ static void remove_notification(struct mqueue_inode_info *info)
568567
if (info->notify_owner != NULL &&
569568
info->notify.sigev_notify == SIGEV_THREAD) {
570569
set_cookie(info->notify_cookie, NOTIFY_REMOVED);
571-
netlink_sendskb(info->notify_sock, info->notify_cookie, 0);
570+
netlink_sendskb(info->notify_sock, info->notify_cookie);
572571
}
573572
put_pid(info->notify_owner);
574573
info->notify_owner = NULL;

‎net/netlink/af_netlink.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
791791
return 0;
792792
}
793793

794-
int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol)
794+
int netlink_sendskb(struct sock *sk, struct sk_buff *skb)
795795
{
796796
int len = skb->len;
797797

@@ -853,7 +853,7 @@ int netlink_unicast(struct sock *ssk, struct sk_buff *skb, u32 pid, int nonblock
853853
if (err)
854854
return err;
855855

856-
return netlink_sendskb(sk, skb, ssk->sk_protocol);
856+
return netlink_sendskb(sk, skb);
857857
}
858858

859859
int netlink_has_listeners(struct sock *sk, unsigned int group)

0 commit comments

Comments
 (0)