Commit a06a2d37 authored by Wu Fengguang's avatar Wu Fengguang Committed by David S. Miller

net: ping_check_bind_addr() etc. can be static

net/ipv4/ping.c:286:5: sparse: symbol 'ping_check_bind_addr' was not declared. Should it be static?
net/ipv4/ping.c:355:6: sparse: symbol 'ping_set_saddr' was not declared. Should it be static?
net/ipv4/ping.c:370:6: sparse: symbol 'ping_clear_saddr' was not declared. Should it be static?

net/ipv6/ping.c:60:5: sparse: symbol 'dummy_ipv6_recv_error' was not declared. Should it be static?
net/ipv6/ping.c:64:5: sparse: symbol 'dummy_ip6_datagram_recv_ctl' was not declared. Should it be static?
net/ipv6/ping.c:69:5: sparse: symbol 'dummy_icmpv6_err_convert' was not declared. Should it be static?
net/ipv6/ping.c:73:6: sparse: symbol 'dummy_ipv6_icmp_error' was not declared. Should it be static?
net/ipv6/ping.c:75:5: sparse: symbol 'dummy_ipv6_chk_addr' was not declared. Should it be static?
net/ipv6/ping.c:201:5: sparse: symbol 'ping_v6_seq_show' was not declared. Should it be static?
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8c367fcb
...@@ -283,8 +283,8 @@ void ping_close(struct sock *sk, long timeout) ...@@ -283,8 +283,8 @@ void ping_close(struct sock *sk, long timeout)
EXPORT_SYMBOL_GPL(ping_close); EXPORT_SYMBOL_GPL(ping_close);
/* Checks the bind address and possibly modifies sk->sk_bound_dev_if. */ /* Checks the bind address and possibly modifies sk->sk_bound_dev_if. */
int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
struct sockaddr *uaddr, int addr_len) { struct sockaddr *uaddr, int addr_len) {
struct net *net = sock_net(sk); struct net *net = sock_net(sk);
if (sk->sk_family == AF_INET) { if (sk->sk_family == AF_INET) {
struct sockaddr_in *addr = (struct sockaddr_in *) uaddr; struct sockaddr_in *addr = (struct sockaddr_in *) uaddr;
...@@ -352,7 +352,7 @@ int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, ...@@ -352,7 +352,7 @@ int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
return 0; return 0;
} }
void ping_set_saddr(struct sock *sk, struct sockaddr *saddr) static void ping_set_saddr(struct sock *sk, struct sockaddr *saddr)
{ {
if (saddr->sa_family == AF_INET) { if (saddr->sa_family == AF_INET) {
struct inet_sock *isk = inet_sk(sk); struct inet_sock *isk = inet_sk(sk);
...@@ -367,7 +367,7 @@ void ping_set_saddr(struct sock *sk, struct sockaddr *saddr) ...@@ -367,7 +367,7 @@ void ping_set_saddr(struct sock *sk, struct sockaddr *saddr)
} }
} }
void ping_clear_saddr(struct sock *sk, int dif) static void ping_clear_saddr(struct sock *sk, int dif)
{ {
sk->sk_bound_dev_if = dif; sk->sk_bound_dev_if = dif;
if (sk->sk_family == AF_INET) { if (sk->sk_family == AF_INET) {
......
...@@ -57,23 +57,23 @@ static struct inet_protosw pingv6_protosw = { ...@@ -57,23 +57,23 @@ static struct inet_protosw pingv6_protosw = {
/* Compatibility glue so we can support IPv6 when it's compiled as a module */ /* Compatibility glue so we can support IPv6 when it's compiled as a module */
int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
{ {
return -EAFNOSUPPORT; return -EAFNOSUPPORT;
} }
int dummy_ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg, static int dummy_ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg,
struct sk_buff *skb) struct sk_buff *skb)
{ {
return -EAFNOSUPPORT; return -EAFNOSUPPORT;
} }
int dummy_icmpv6_err_convert(u8 type, u8 code, int *err) static int dummy_icmpv6_err_convert(u8 type, u8 code, int *err)
{ {
return -EAFNOSUPPORT; return -EAFNOSUPPORT;
} }
void dummy_ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, static void dummy_ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
__be16 port, u32 info, u8 *payload) {} __be16 port, u32 info, u8 *payload) {}
int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr, static int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
const struct net_device *dev, int strict) const struct net_device *dev, int strict)
{ {
return 0; return 0;
} }
...@@ -198,7 +198,7 @@ static void *ping_v6_seq_start(struct seq_file *seq, loff_t *pos) ...@@ -198,7 +198,7 @@ static void *ping_v6_seq_start(struct seq_file *seq, loff_t *pos)
return ping_seq_start(seq, pos, AF_INET6); return ping_seq_start(seq, pos, AF_INET6);
} }
int ping_v6_seq_show(struct seq_file *seq, void *v) static int ping_v6_seq_show(struct seq_file *seq, void *v)
{ {
if (v == SEQ_START_TOKEN) { if (v == SEQ_START_TOKEN) {
seq_puts(seq, IPV6_SEQ_DGRAM_HEADER); seq_puts(seq, IPV6_SEQ_DGRAM_HEADER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment