Skip to content

Commit

Permalink
netlink: cleanup tap related functions
Browse files Browse the repository at this point in the history
Cleanups in netlink_tap code
 * remove unused function netlink_clear_multicast_users
 * make local function static

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jan 2, 2014
1 parent 6da67d2 commit 2173f8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 0 additions & 2 deletions include/linux/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ extern void netlink_kernel_release(struct sock *sk);
extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group);
extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group);
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
extern int netlink_has_listeners(struct sock *sk, unsigned int group);
extern struct sk_buff *netlink_alloc_skb(struct sock *ssk, unsigned int size,
Expand Down Expand Up @@ -168,7 +167,6 @@ struct netlink_tap {
};

extern int netlink_add_tap(struct netlink_tap *nt);
extern int __netlink_remove_tap(struct netlink_tap *nt);
extern int netlink_remove_tap(struct netlink_tap *nt);

#endif /* __LINUX_NETLINK_H */
18 changes: 1 addition & 17 deletions net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int netlink_add_tap(struct netlink_tap *nt)
}
EXPORT_SYMBOL_GPL(netlink_add_tap);

int __netlink_remove_tap(struct netlink_tap *nt)
static int __netlink_remove_tap(struct netlink_tap *nt)
{
bool found = false;
struct netlink_tap *tmp;
Expand All @@ -155,7 +155,6 @@ int __netlink_remove_tap(struct netlink_tap *nt)

return found ? 0 : -ENODEV;
}
EXPORT_SYMBOL_GPL(__netlink_remove_tap);

int netlink_remove_tap(struct netlink_tap *nt)
{
Expand Down Expand Up @@ -2540,21 +2539,6 @@ void __netlink_clear_multicast_users(struct sock *ksk, unsigned int group)
netlink_update_socket_mc(nlk_sk(sk), group, 0);
}

/**
* netlink_clear_multicast_users - kick off multicast listeners
*
* This function removes all listeners from the given group.
* @ksk: The kernel netlink socket, as returned by
* netlink_kernel_create().
* @group: The multicast group to clear.
*/
void netlink_clear_multicast_users(struct sock *ksk, unsigned int group)
{
netlink_table_grab();
__netlink_clear_multicast_users(ksk, group);
netlink_table_ungrab();
}

struct nlmsghdr *
__nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags)
{
Expand Down

0 comments on commit 2173f8d

Please sign in to comment.