Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8182804 authored by Richard Alpe's avatar Richard Alpe Committed by David S. Miller
Browse files

tipc: fix sparse warnings in new nl api



Fix sparse warnings about non-static declaration of static functions
in the new tipc netlink API.

Signed-off-by: default avatarRichard Alpe <richard.alpe@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 958d03b0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -767,7 +767,8 @@ void tipc_bcbearer_sort(struct tipc_node_map *nm_ptr, u32 node, bool action)
	tipc_bclink_unlock();
}

int __tipc_nl_add_bc_link_stat(struct sk_buff *skb, struct tipc_stats *stats)
static int __tipc_nl_add_bc_link_stat(struct sk_buff *skb,
				      struct tipc_stats *stats)
{
	int i;
	struct nlattr *nest;
+4 −2
Original line number Diff line number Diff line
@@ -647,7 +647,8 @@ void tipc_bearer_stop(void)
}

/* Caller should hold rtnl_lock to protect the bearer */
int __tipc_nl_add_bearer(struct tipc_nl_msg *msg, struct tipc_bearer *bearer)
static int __tipc_nl_add_bearer(struct tipc_nl_msg *msg,
				struct tipc_bearer *bearer)
{
	void *hdr;
	struct nlattr *attrs;
@@ -905,7 +906,8 @@ int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info)
	return 0;
}

int __tipc_nl_add_media(struct tipc_nl_msg *msg, struct tipc_media *media)
static int __tipc_nl_add_media(struct tipc_nl_msg *msg,
			       struct tipc_media *media)
{
	void *hdr;
	struct nlattr *attrs;
+6 −4
Original line number Diff line number Diff line
@@ -2514,7 +2514,8 @@ int tipc_nl_link_set(struct sk_buff *skb, struct genl_info *info)

	return res;
}
int __tipc_nl_add_stats(struct sk_buff *skb, struct tipc_stats *s)

static int __tipc_nl_add_stats(struct sk_buff *skb, struct tipc_stats *s)
{
	int i;
	struct nlattr *stats;
@@ -2580,7 +2581,7 @@ int __tipc_nl_add_stats(struct sk_buff *skb, struct tipc_stats *s)
}

/* Caller should hold appropriate locks to protect the link */
int __tipc_nl_add_link(struct tipc_nl_msg *msg, struct tipc_link *link)
static int __tipc_nl_add_link(struct tipc_nl_msg *msg, struct tipc_link *link)
{
	int err;
	void *hdr;
@@ -2649,7 +2650,8 @@ int __tipc_nl_add_link(struct tipc_nl_msg *msg, struct tipc_link *link)
}

/* Caller should hold node lock  */
int __tipc_nl_add_node_links(struct tipc_nl_msg *msg, struct tipc_node *node,
static int __tipc_nl_add_node_links(struct tipc_nl_msg *msg,
				    struct tipc_node *node,
				    u32 *prev_link)
{
	u32 i;
+7 −6
Original line number Diff line number Diff line
@@ -1002,7 +1002,8 @@ void tipc_nametbl_stop(void)
	write_unlock_bh(&tipc_nametbl_lock);
}

int __tipc_nl_add_nametable_publ(struct tipc_nl_msg *msg, struct name_seq *seq,
static int __tipc_nl_add_nametable_publ(struct tipc_nl_msg *msg,
					struct name_seq *seq,
					struct sub_seq *sseq, u32 *last_publ)
{
	void *hdr;
@@ -1071,7 +1072,7 @@ int __tipc_nl_add_nametable_publ(struct tipc_nl_msg *msg, struct name_seq *seq,
	return -EMSGSIZE;
}

int __tipc_nl_subseq_list(struct tipc_nl_msg *msg, struct name_seq *seq,
static int __tipc_nl_subseq_list(struct tipc_nl_msg *msg, struct name_seq *seq,
				 u32 *last_lower, u32 *last_publ)
{
	struct sub_seq *sseq;
@@ -1098,8 +1099,8 @@ int __tipc_nl_subseq_list(struct tipc_nl_msg *msg, struct name_seq *seq,
	return 0;
}

int __tipc_nl_seq_list(struct tipc_nl_msg *msg, u32 *last_type, u32 *last_lower,
		       u32 *last_publ)
static int __tipc_nl_seq_list(struct tipc_nl_msg *msg, u32 *last_type,
			      u32 *last_lower, u32 *last_publ)
{
	struct hlist_head *seq_head;
	struct name_seq *seq;
+1 −1
Original line number Diff line number Diff line
@@ -609,7 +609,7 @@ void tipc_node_unlock(struct tipc_node *node)
}

/* Caller should hold node lock for the passed node */
int __tipc_nl_add_node(struct tipc_nl_msg *msg, struct tipc_node *node)
static int __tipc_nl_add_node(struct tipc_nl_msg *msg, struct tipc_node *node)
{
	void *hdr;
	struct nlattr *attrs;
Loading