diff options
| author | Wu Fengguang <fengguang.wu@intel.com> | 2013-06-12 09:04:16 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-06-13 04:36:41 -0400 |
| commit | a06a2d378dbf099c874ad58de07a8e54ffdc94d3 (patch) | |
| tree | 22b93d53d369968e1833767852643ccd39eae86e | |
| parent | 8c367fcbe6549195d2eb11e62bea233f811aad41 (diff) | |
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: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/ipv4/ping.c | 8 | ||||
| -rw-r--r-- | net/ipv6/ping.c | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 1f1b2dd90277..746427c9e719 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c | |||
| @@ -283,8 +283,8 @@ void ping_close(struct sock *sk, long timeout) | |||
| 283 | EXPORT_SYMBOL_GPL(ping_close); | 283 | EXPORT_SYMBOL_GPL(ping_close); |
| 284 | 284 | ||
| 285 | /* Checks the bind address and possibly modifies sk->sk_bound_dev_if. */ | 285 | /* Checks the bind address and possibly modifies sk->sk_bound_dev_if. */ |
| 286 | int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, | 286 | static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk, |
| 287 | struct sockaddr *uaddr, int addr_len) { | 287 | struct sockaddr *uaddr, int addr_len) { |
| 288 | struct net *net = sock_net(sk); | 288 | struct net *net = sock_net(sk); |
| 289 | if (sk->sk_family == AF_INET) { | 289 | if (sk->sk_family == AF_INET) { |
| 290 | struct sockaddr_in *addr = (struct sockaddr_in *) uaddr; | 290 | 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 | return 0; | 352 | return 0; |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | void ping_set_saddr(struct sock *sk, struct sockaddr *saddr) | 355 | static void ping_set_saddr(struct sock *sk, struct sockaddr *saddr) |
| 356 | { | 356 | { |
| 357 | if (saddr->sa_family == AF_INET) { | 357 | if (saddr->sa_family == AF_INET) { |
| 358 | struct inet_sock *isk = inet_sk(sk); | 358 | struct inet_sock *isk = inet_sk(sk); |
| @@ -367,7 +367,7 @@ void ping_set_saddr(struct sock *sk, struct sockaddr *saddr) | |||
| 367 | } | 367 | } |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | void ping_clear_saddr(struct sock *sk, int dif) | 370 | static void ping_clear_saddr(struct sock *sk, int dif) |
| 371 | { | 371 | { |
| 372 | sk->sk_bound_dev_if = dif; | 372 | sk->sk_bound_dev_if = dif; |
| 373 | if (sk->sk_family == AF_INET) { | 373 | if (sk->sk_family == AF_INET) { |
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index a43110385918..2b52046e1263 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c | |||
| @@ -57,23 +57,23 @@ static struct inet_protosw pingv6_protosw = { | |||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ | 59 | /* Compatibility glue so we can support IPv6 when it's compiled as a module */ |
| 60 | int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | 60 | static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) |
| 61 | { | 61 | { |
| 62 | return -EAFNOSUPPORT; | 62 | return -EAFNOSUPPORT; |
| 63 | } | 63 | } |
| 64 | int dummy_ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg, | 64 | static int dummy_ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg, |
| 65 | struct sk_buff *skb) | 65 | struct sk_buff *skb) |
| 66 | { | 66 | { |
| 67 | return -EAFNOSUPPORT; | 67 | return -EAFNOSUPPORT; |
| 68 | } | 68 | } |
| 69 | int dummy_icmpv6_err_convert(u8 type, u8 code, int *err) | 69 | static int dummy_icmpv6_err_convert(u8 type, u8 code, int *err) |
| 70 | { | 70 | { |
| 71 | return -EAFNOSUPPORT; | 71 | return -EAFNOSUPPORT; |
| 72 | } | 72 | } |
| 73 | void dummy_ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, | 73 | static void dummy_ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, |
| 74 | __be16 port, u32 info, u8 *payload) {} | 74 | __be16 port, u32 info, u8 *payload) {} |
| 75 | int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr, | 75 | static int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr, |
| 76 | const struct net_device *dev, int strict) | 76 | const struct net_device *dev, int strict) |
| 77 | { | 77 | { |
| 78 | return 0; | 78 | return 0; |
| 79 | } | 79 | } |
| @@ -198,7 +198,7 @@ static void *ping_v6_seq_start(struct seq_file *seq, loff_t *pos) | |||
| 198 | return ping_seq_start(seq, pos, AF_INET6); | 198 | return ping_seq_start(seq, pos, AF_INET6); |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | int ping_v6_seq_show(struct seq_file *seq, void *v) | 201 | static int ping_v6_seq_show(struct seq_file *seq, void *v) |
| 202 | { | 202 | { |
| 203 | if (v == SEQ_START_TOKEN) { | 203 | if (v == SEQ_START_TOKEN) { |
| 204 | seq_puts(seq, IPV6_SEQ_DGRAM_HEADER); | 204 | seq_puts(seq, IPV6_SEQ_DGRAM_HEADER); |
