* [PATCH next] tipc: make three functions static
@ 2020-02-10 8:11 Chen Wandun
2020-02-10 9:24 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Chen Wandun @ 2020-02-10 8:11 UTC (permalink / raw)
To: jon.maloy, ying.xue, davem, kuba, tuong.t.lien, netdev,
tipc-discussion, linux-kernel
Cc: chenwandun
Fix the following sparse warning:
net/tipc/node.c:281:6: warning: symbol 'tipc_node_free' was not declared. Should it be static?
net/tipc/node.c:2801:5: warning: symbol '__tipc_nl_node_set_key' was not declared. Should it be static?
net/tipc/node.c:2878:5: warning: symbol '__tipc_nl_node_flush_key' was not declared. Should it be static?
Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication")
Fixes: e1f32190cf7d ("tipc: add support for AEAD key setting via netlink")
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
---
net/tipc/node.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 99b28b69fc17..0c88778c88b5 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -278,7 +278,7 @@ struct tipc_crypto *tipc_node_crypto_rx_by_list(struct list_head *pos)
}
#endif
-void tipc_node_free(struct rcu_head *rp)
+static void tipc_node_free(struct rcu_head *rp)
{
struct tipc_node *n = container_of(rp, struct tipc_node, rcu);
@@ -2798,7 +2798,7 @@ static int tipc_nl_retrieve_nodeid(struct nlattr **attrs, u8 **node_id)
return 0;
}
-int __tipc_nl_node_set_key(struct sk_buff *skb, struct genl_info *info)
+static int __tipc_nl_node_set_key(struct sk_buff *skb, struct genl_info *info)
{
struct nlattr *attrs[TIPC_NLA_NODE_MAX + 1];
struct net *net = sock_net(skb->sk);
@@ -2875,7 +2875,8 @@ int tipc_nl_node_set_key(struct sk_buff *skb, struct genl_info *info)
return err;
}
-int __tipc_nl_node_flush_key(struct sk_buff *skb, struct genl_info *info)
+static int __tipc_nl_node_flush_key(struct sk_buff *skb,
+ struct genl_info *info)
{
struct net *net = sock_net(skb->sk);
struct tipc_net *tn = tipc_net(net);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH next] tipc: make three functions static
2020-02-10 8:11 [PATCH next] tipc: make three functions static Chen Wandun
@ 2020-02-10 9:24 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-02-10 9:24 UTC (permalink / raw)
To: chenwandun
Cc: jon.maloy, ying.xue, kuba, tuong.t.lien, netdev, tipc-discussion,
linux-kernel
From: Chen Wandun <chenwandun@huawei.com>
Date: Mon, 10 Feb 2020 16:11:09 +0800
> Fix the following sparse warning:
>
> net/tipc/node.c:281:6: warning: symbol 'tipc_node_free' was not declared. Should it be static?
> net/tipc/node.c:2801:5: warning: symbol '__tipc_nl_node_set_key' was not declared. Should it be static?
> net/tipc/node.c:2878:5: warning: symbol '__tipc_nl_node_flush_key' was not declared. Should it be static?
>
> Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication")
> Fixes: e1f32190cf7d ("tipc: add support for AEAD key setting via netlink")
>
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-10 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 8:11 [PATCH next] tipc: make three functions static Chen Wandun
2020-02-10 9:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).