Skip to content

Commit

Permalink
[NET]: cleanup 3rd argument in netlink_sendskb
Browse files Browse the repository at this point in the history
netlink_sendskb does not use third argument. Clean it and save a couple of
bytes.

Signed-off-by: Denis V. Lunev <[email protected]>
Acked-by: Alexey Kuznetsov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Denis V. Lunev authored and davem330 committed Oct 11, 2007
1 parent 3b71535 commit 7ee015e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/linux/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ struct sock *netlink_getsockbyfilp(struct file *filp);
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.
Expand Down
5 changes: 2 additions & 3 deletions ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,7 @@ static void __do_notify(struct mqueue_inode_info *info)
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 */
Expand Down Expand Up @@ -568,7 +567,7 @@ static void remove_notification(struct mqueue_inode_info *info)
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;
Expand Down
4 changes: 2 additions & 2 deletions net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
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;

Expand Down Expand Up @@ -853,7 +853,7 @@ int netlink_unicast(struct sock *ssk, struct sk_buff *skb, u32 pid, int nonblock
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)
Expand Down

0 comments on commit 7ee015e

Please sign in to comment.