diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-08-09 22:35:47 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:33:20 -0400 |
commit | 0742fd53a3774781255bd1e471e7aa2e4a82d5f7 (patch) | |
tree | 020e6d1ccb1d7ce07cdb26b7317fa2ca58e689b3 | |
parent | f2ccd8fa06c8e302116e71df372f5c1f83432e03 (diff) |
[IPV4]: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global function:
- xfrm4_state.c: xfrm4_state_fini
- remove the following unneeded EXPORT_SYMBOL's:
- ip_output.c: ip_finish_output
- ip_output.c: sysctl_ip_default_ttl
- fib_frontend.c: ip_dev_find
- inetpeer.c: inet_peer_idlock
- ip_options.c: ip_options_compile
- ip_options.c: ip_options_undo
- net/core/request_sock.c: sysctl_max_syn_backlog
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/ip.h | 2 | ||||
-rw-r--r-- | include/net/route.h | 4 | ||||
-rw-r--r-- | include/net/xfrm.h | 1 | ||||
-rw-r--r-- | net/core/request_sock.c | 1 | ||||
-rw-r--r-- | net/ipv4/fib_frontend.c | 1 | ||||
-rw-r--r-- | net/ipv4/inetpeer.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_options.c | 3 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 7 | ||||
-rw-r--r-- | net/ipv4/multipath_drr.c | 2 | ||||
-rw-r--r-- | net/ipv4/route.c | 4 | ||||
-rw-r--r-- | net/ipv4/xfrm4_state.c | 2 |
11 files changed, 7 insertions, 22 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 2570b536c8f4..c16fb6ac3446 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -140,8 +140,6 @@ struct ip_reply_arg { | |||
140 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, | 140 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, |
141 | unsigned int len); | 141 | unsigned int len); |
142 | 142 | ||
143 | extern int ip_finish_output(struct sk_buff *skb); | ||
144 | |||
145 | struct ipv4_config | 143 | struct ipv4_config |
146 | { | 144 | { |
147 | int log_martians; | 145 | int log_martians; |
diff --git a/include/net/route.h b/include/net/route.h index c3cd069a9aca..63c94558236d 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -105,10 +105,6 @@ struct rt_cache_stat | |||
105 | unsigned int out_hlist_search; | 105 | unsigned int out_hlist_search; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | extern struct rt_cache_stat *rt_cache_stat; | ||
109 | #define RT_CACHE_STAT_INC(field) \ | ||
110 | (per_cpu_ptr(rt_cache_stat, raw_smp_processor_id())->field++) | ||
111 | |||
112 | extern struct ip_rt_acct *ip_rt_acct; | 108 | extern struct ip_rt_acct *ip_rt_acct; |
113 | 109 | ||
114 | struct in_device; | 110 | struct in_device; |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 868ef88ef971..a9d0d8c5dfbf 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -818,7 +818,6 @@ extern void xfrm6_init(void); | |||
818 | extern void xfrm6_fini(void); | 818 | extern void xfrm6_fini(void); |
819 | extern void xfrm_state_init(void); | 819 | extern void xfrm_state_init(void); |
820 | extern void xfrm4_state_init(void); | 820 | extern void xfrm4_state_init(void); |
821 | extern void xfrm4_state_fini(void); | ||
822 | extern void xfrm6_state_init(void); | 821 | extern void xfrm6_state_init(void); |
823 | extern void xfrm6_state_fini(void); | 822 | extern void xfrm6_state_fini(void); |
824 | 823 | ||
diff --git a/net/core/request_sock.c b/net/core/request_sock.c index 4e99ce5c08f2..98f0fc923f91 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * Further increasing requires to change hash table size. | 32 | * Further increasing requires to change hash table size. |
33 | */ | 33 | */ |
34 | int sysctl_max_syn_backlog = 256; | 34 | int sysctl_max_syn_backlog = 256; |
35 | EXPORT_SYMBOL(sysctl_max_syn_backlog); | ||
36 | 35 | ||
37 | int reqsk_queue_alloc(struct request_sock_queue *queue, | 36 | int reqsk_queue_alloc(struct request_sock_queue *queue, |
38 | const int nr_table_entries) | 37 | const int nr_table_entries) |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index cd8e45ab9580..e5722084239b 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -662,5 +662,4 @@ void __init ip_fib_init(void) | |||
662 | } | 662 | } |
663 | 663 | ||
664 | EXPORT_SYMBOL(inet_addr_type); | 664 | EXPORT_SYMBOL(inet_addr_type); |
665 | EXPORT_SYMBOL(ip_dev_find); | ||
666 | EXPORT_SYMBOL(ip_rt_ioctl); | 665 | EXPORT_SYMBOL(ip_rt_ioctl); |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index ab18a853d7ce..3c513ceaca76 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
@@ -459,5 +459,3 @@ static void peer_check_expire(unsigned long dummy) | |||
459 | peer_total / inet_peer_threshold * HZ; | 459 | peer_total / inet_peer_threshold * HZ; |
460 | add_timer(&peer_periodic_timer); | 460 | add_timer(&peer_periodic_timer); |
461 | } | 461 | } |
462 | |||
463 | EXPORT_SYMBOL(inet_peer_idlock); | ||
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 6d89f3f3e701..7e02ba584079 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -620,6 +620,3 @@ int ip_options_rcv_srr(struct sk_buff *skb) | |||
620 | } | 620 | } |
621 | return 0; | 621 | return 0; |
622 | } | 622 | } |
623 | |||
624 | EXPORT_SYMBOL(ip_options_compile); | ||
625 | EXPORT_SYMBOL(ip_options_undo); | ||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 766564cb4207..c934f5316c3b 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -205,7 +205,7 @@ static inline int ip_finish_output2(struct sk_buff *skb) | |||
205 | return -EINVAL; | 205 | return -EINVAL; |
206 | } | 206 | } |
207 | 207 | ||
208 | int ip_finish_output(struct sk_buff *skb) | 208 | static int ip_finish_output(struct sk_buff *skb) |
209 | { | 209 | { |
210 | struct net_device *dev = skb->dst->dev; | 210 | struct net_device *dev = skb->dst->dev; |
211 | 211 | ||
@@ -1328,12 +1328,7 @@ void __init ip_init(void) | |||
1328 | #endif | 1328 | #endif |
1329 | } | 1329 | } |
1330 | 1330 | ||
1331 | EXPORT_SYMBOL(ip_finish_output); | ||
1332 | EXPORT_SYMBOL(ip_fragment); | 1331 | EXPORT_SYMBOL(ip_fragment); |
1333 | EXPORT_SYMBOL(ip_generic_getfrag); | 1332 | EXPORT_SYMBOL(ip_generic_getfrag); |
1334 | EXPORT_SYMBOL(ip_queue_xmit); | 1333 | EXPORT_SYMBOL(ip_queue_xmit); |
1335 | EXPORT_SYMBOL(ip_send_check); | 1334 | EXPORT_SYMBOL(ip_send_check); |
1336 | |||
1337 | #ifdef CONFIG_SYSCTL | ||
1338 | EXPORT_SYMBOL(sysctl_ip_default_ttl); | ||
1339 | #endif | ||
diff --git a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c index c9cf8726051d..db67373f9b34 100644 --- a/net/ipv4/multipath_drr.c +++ b/net/ipv4/multipath_drr.c | |||
@@ -107,7 +107,7 @@ static int drr_dev_event(struct notifier_block *this, | |||
107 | return NOTIFY_DONE; | 107 | return NOTIFY_DONE; |
108 | } | 108 | } |
109 | 109 | ||
110 | struct notifier_block drr_dev_notifier = { | 110 | static struct notifier_block drr_dev_notifier = { |
111 | .notifier_call = drr_dev_event, | 111 | .notifier_call = drr_dev_event, |
112 | }; | 112 | }; |
113 | 113 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index d675ff80b04d..3aef0e15460f 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -240,7 +240,9 @@ static unsigned rt_hash_mask; | |||
240 | static int rt_hash_log; | 240 | static int rt_hash_log; |
241 | static unsigned int rt_hash_rnd; | 241 | static unsigned int rt_hash_rnd; |
242 | 242 | ||
243 | struct rt_cache_stat *rt_cache_stat; | 243 | static struct rt_cache_stat *rt_cache_stat; |
244 | #define RT_CACHE_STAT_INC(field) \ | ||
245 | (per_cpu_ptr(rt_cache_stat, raw_smp_processor_id())->field++) | ||
244 | 246 | ||
245 | static int rt_intern_hash(unsigned hash, struct rtable *rth, | 247 | static int rt_intern_hash(unsigned hash, struct rtable *rth, |
246 | struct rtable **res); | 248 | struct rtable **res); |
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c index 050611d7a967..d23e07fc81fa 100644 --- a/net/ipv4/xfrm4_state.c +++ b/net/ipv4/xfrm4_state.c | |||
@@ -128,8 +128,10 @@ void __init xfrm4_state_init(void) | |||
128 | xfrm_state_register_afinfo(&xfrm4_state_afinfo); | 128 | xfrm_state_register_afinfo(&xfrm4_state_afinfo); |
129 | } | 129 | } |
130 | 130 | ||
131 | #if 0 | ||
131 | void __exit xfrm4_state_fini(void) | 132 | void __exit xfrm4_state_fini(void) |
132 | { | 133 | { |
133 | xfrm_state_unregister_afinfo(&xfrm4_state_afinfo); | 134 | xfrm_state_unregister_afinfo(&xfrm4_state_afinfo); |
134 | } | 135 | } |
136 | #endif /* 0 */ | ||
135 | 137 | ||