aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-10-18 16:48:24 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-19 19:12:11 -0400
commit7e58487b8cf5871d2a0fa03892dbd4b3a620d07f (patch)
tree2cd2e2e7e8732a23628872b1fc1779d86c39b0b5
parenta402a5aa9b4cbb42cc41bf573d2e5c4713541af0 (diff)
net: ipv4/ipv6: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/fib_lookup.h26
-rw-r--r--net/ipv4/tcp_vegas.h10
-rw-r--r--net/ipv4/udp_impl.h36
-rw-r--r--net/ipv6/udp_impl.h41
4 files changed, 54 insertions, 59 deletions
diff --git a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h
index 50cfb3ef560f..388d113fd289 100644
--- a/net/ipv4/fib_lookup.h
+++ b/net/ipv4/fib_lookup.h
@@ -24,21 +24,17 @@ static inline void fib_alias_accessed(struct fib_alias *fa)
24} 24}
25 25
26/* Exported by fib_semantics.c */ 26/* Exported by fib_semantics.c */
27extern void fib_release_info(struct fib_info *); 27void fib_release_info(struct fib_info *);
28extern struct fib_info *fib_create_info(struct fib_config *cfg); 28struct fib_info *fib_create_info(struct fib_config *cfg);
29extern int fib_nh_match(struct fib_config *cfg, struct fib_info *fi); 29int fib_nh_match(struct fib_config *cfg, struct fib_info *fi);
30extern int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, 30int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, u32 tb_id,
31 u32 tb_id, u8 type, __be32 dst, 31 u8 type, __be32 dst, int dst_len, u8 tos, struct fib_info *fi,
32 int dst_len, u8 tos, struct fib_info *fi, 32 unsigned int);
33 unsigned int); 33void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, int dst_len,
34extern void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, 34 u32 tb_id, const struct nl_info *info, unsigned int nlm_flags);
35 int dst_len, u32 tb_id, const struct nl_info *info, 35struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio);
36 unsigned int nlm_flags); 36int fib_detect_death(struct fib_info *fi, int order,
37extern struct fib_alias *fib_find_alias(struct list_head *fah, 37 struct fib_info **last_resort, int *last_idx, int dflt);
38 u8 tos, u32 prio);
39extern int fib_detect_death(struct fib_info *fi, int order,
40 struct fib_info **last_resort,
41 int *last_idx, int dflt);
42 38
43static inline void fib_result_assign(struct fib_result *res, 39static inline void fib_result_assign(struct fib_result *res,
44 struct fib_info *fi) 40 struct fib_info *fi)
diff --git a/net/ipv4/tcp_vegas.h b/net/ipv4/tcp_vegas.h
index 6c0eea2f8249..0531b99d8637 100644
--- a/net/ipv4/tcp_vegas.h
+++ b/net/ipv4/tcp_vegas.h
@@ -15,10 +15,10 @@ struct vegas {
15 u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */ 15 u32 baseRTT; /* the min of all Vegas RTT measurements seen (in usec) */
16}; 16};
17 17
18extern void tcp_vegas_init(struct sock *sk); 18void tcp_vegas_init(struct sock *sk);
19extern void tcp_vegas_state(struct sock *sk, u8 ca_state); 19void tcp_vegas_state(struct sock *sk, u8 ca_state);
20extern void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us); 20void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us);
21extern void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event); 21void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
22extern void tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb); 22void tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb);
23 23
24#endif /* __TCP_VEGAS_H */ 24#endif /* __TCP_VEGAS_H */
diff --git a/net/ipv4/udp_impl.h b/net/ipv4/udp_impl.h
index 5a681e298b90..f3c27899f62b 100644
--- a/net/ipv4/udp_impl.h
+++ b/net/ipv4/udp_impl.h
@@ -5,30 +5,30 @@
5#include <net/protocol.h> 5#include <net/protocol.h>
6#include <net/inet_common.h> 6#include <net/inet_common.h>
7 7
8extern int __udp4_lib_rcv(struct sk_buff *, struct udp_table *, int ); 8int __udp4_lib_rcv(struct sk_buff *, struct udp_table *, int);
9extern void __udp4_lib_err(struct sk_buff *, u32, struct udp_table *); 9void __udp4_lib_err(struct sk_buff *, u32, struct udp_table *);
10 10
11extern int udp_v4_get_port(struct sock *sk, unsigned short snum); 11int udp_v4_get_port(struct sock *sk, unsigned short snum);
12 12
13extern int udp_setsockopt(struct sock *sk, int level, int optname, 13int udp_setsockopt(struct sock *sk, int level, int optname,
14 char __user *optval, unsigned int optlen); 14 char __user *optval, unsigned int optlen);
15extern int udp_getsockopt(struct sock *sk, int level, int optname, 15int udp_getsockopt(struct sock *sk, int level, int optname,
16 char __user *optval, int __user *optlen); 16 char __user *optval, int __user *optlen);
17 17
18#ifdef CONFIG_COMPAT 18#ifdef CONFIG_COMPAT
19extern int compat_udp_setsockopt(struct sock *sk, int level, int optname, 19int compat_udp_setsockopt(struct sock *sk, int level, int optname,
20 char __user *optval, unsigned int optlen); 20 char __user *optval, unsigned int optlen);
21extern int compat_udp_getsockopt(struct sock *sk, int level, int optname, 21int compat_udp_getsockopt(struct sock *sk, int level, int optname,
22 char __user *optval, int __user *optlen); 22 char __user *optval, int __user *optlen);
23#endif 23#endif
24extern int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 24int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
25 size_t len, int noblock, int flags, int *addr_len); 25 size_t len, int noblock, int flags, int *addr_len);
26extern int udp_sendpage(struct sock *sk, struct page *page, int offset, 26int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size,
27 size_t size, int flags); 27 int flags);
28extern int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); 28int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
29extern void udp_destroy_sock(struct sock *sk); 29void udp_destroy_sock(struct sock *sk);
30 30
31#ifdef CONFIG_PROC_FS 31#ifdef CONFIG_PROC_FS
32extern int udp4_seq_show(struct seq_file *seq, void *v); 32int udp4_seq_show(struct seq_file *seq, void *v);
33#endif 33#endif
34#endif /* _UDP4_IMPL_H */ 34#endif /* _UDP4_IMPL_H */
diff --git a/net/ipv6/udp_impl.h b/net/ipv6/udp_impl.h
index 4691ed50a928..c779c3c90b9d 100644
--- a/net/ipv6/udp_impl.h
+++ b/net/ipv6/udp_impl.h
@@ -7,33 +7,32 @@
7#include <net/inet_common.h> 7#include <net/inet_common.h>
8#include <net/transp_v6.h> 8#include <net/transp_v6.h>
9 9
10extern int __udp6_lib_rcv(struct sk_buff *, struct udp_table *, int ); 10int __udp6_lib_rcv(struct sk_buff *, struct udp_table *, int);
11extern void __udp6_lib_err(struct sk_buff *, struct inet6_skb_parm *, 11void __udp6_lib_err(struct sk_buff *, struct inet6_skb_parm *, u8, u8, int,
12 u8 , u8 , int , __be32 , struct udp_table *); 12 __be32, struct udp_table *);
13 13
14extern int udp_v6_get_port(struct sock *sk, unsigned short snum); 14int udp_v6_get_port(struct sock *sk, unsigned short snum);
15 15
16extern int udpv6_getsockopt(struct sock *sk, int level, int optname, 16int udpv6_getsockopt(struct sock *sk, int level, int optname,
17 char __user *optval, int __user *optlen); 17 char __user *optval, int __user *optlen);
18extern int udpv6_setsockopt(struct sock *sk, int level, int optname, 18int udpv6_setsockopt(struct sock *sk, int level, int optname,
19 char __user *optval, unsigned int optlen); 19 char __user *optval, unsigned int optlen);
20#ifdef CONFIG_COMPAT 20#ifdef CONFIG_COMPAT
21extern int compat_udpv6_setsockopt(struct sock *sk, int level, int optname, 21int compat_udpv6_setsockopt(struct sock *sk, int level, int optname,
22 char __user *optval, unsigned int optlen); 22 char __user *optval, unsigned int optlen);
23extern int compat_udpv6_getsockopt(struct sock *sk, int level, int optname, 23int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
24 char __user *optval, int __user *optlen); 24 char __user *optval, int __user *optlen);
25#endif 25#endif
26extern int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, 26int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
27 struct msghdr *msg, size_t len); 27 size_t len);
28extern int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, 28int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
29 struct msghdr *msg, size_t len, 29 size_t len, int noblock, int flags, int *addr_len);
30 int noblock, int flags, int *addr_len); 30int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
31extern int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb); 31void udpv6_destroy_sock(struct sock *sk);
32extern void udpv6_destroy_sock(struct sock *sk);
33 32
34extern void udp_v6_clear_sk(struct sock *sk, int size); 33void udp_v6_clear_sk(struct sock *sk, int size);
35 34
36#ifdef CONFIG_PROC_FS 35#ifdef CONFIG_PROC_FS
37extern int udp6_seq_show(struct seq_file *seq, void *v); 36int udp6_seq_show(struct seq_file *seq, void *v);
38#endif 37#endif
39#endif /* _UDP6_IMPL_H */ 38#endif /* _UDP6_IMPL_H */