aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-08-09 22:35:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:33:20 -0400
commit0742fd53a3774781255bd1e471e7aa2e4a82d5f7 (patch)
tree020e6d1ccb1d7ce07cdb26b7317fa2ca58e689b3
parentf2ccd8fa06c8e302116e71df372f5c1f83432e03 (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.h2
-rw-r--r--include/net/route.h4
-rw-r--r--include/net/xfrm.h1
-rw-r--r--net/core/request_sock.c1
-rw-r--r--net/ipv4/fib_frontend.c1
-rw-r--r--net/ipv4/inetpeer.c2
-rw-r--r--net/ipv4/ip_options.c3
-rw-r--r--net/ipv4/ip_output.c7
-rw-r--r--net/ipv4/multipath_drr.c2
-rw-r--r--net/ipv4/route.c4
-rw-r--r--net/ipv4/xfrm4_state.c2
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 {
140void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, 140void 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
143extern int ip_finish_output(struct sk_buff *skb);
144
145struct ipv4_config 143struct 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
108extern 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
112extern struct ip_rt_acct *ip_rt_acct; 108extern struct ip_rt_acct *ip_rt_acct;
113 109
114struct in_device; 110struct 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);
818extern void xfrm6_fini(void); 818extern void xfrm6_fini(void);
819extern void xfrm_state_init(void); 819extern void xfrm_state_init(void);
820extern void xfrm4_state_init(void); 820extern void xfrm4_state_init(void);
821extern void xfrm4_state_fini(void);
822extern void xfrm6_state_init(void); 821extern void xfrm6_state_init(void);
823extern void xfrm6_state_fini(void); 822extern 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 */
34int sysctl_max_syn_backlog = 256; 34int sysctl_max_syn_backlog = 256;
35EXPORT_SYMBOL(sysctl_max_syn_backlog);
36 35
37int reqsk_queue_alloc(struct request_sock_queue *queue, 36int 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
664EXPORT_SYMBOL(inet_addr_type); 664EXPORT_SYMBOL(inet_addr_type);
665EXPORT_SYMBOL(ip_dev_find);
666EXPORT_SYMBOL(ip_rt_ioctl); 665EXPORT_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
463EXPORT_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
624EXPORT_SYMBOL(ip_options_compile);
625EXPORT_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
208int ip_finish_output(struct sk_buff *skb) 208static 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
1331EXPORT_SYMBOL(ip_finish_output);
1332EXPORT_SYMBOL(ip_fragment); 1331EXPORT_SYMBOL(ip_fragment);
1333EXPORT_SYMBOL(ip_generic_getfrag); 1332EXPORT_SYMBOL(ip_generic_getfrag);
1334EXPORT_SYMBOL(ip_queue_xmit); 1333EXPORT_SYMBOL(ip_queue_xmit);
1335EXPORT_SYMBOL(ip_send_check); 1334EXPORT_SYMBOL(ip_send_check);
1336
1337#ifdef CONFIG_SYSCTL
1338EXPORT_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
110struct notifier_block drr_dev_notifier = { 110static 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;
240static int rt_hash_log; 240static int rt_hash_log;
241static unsigned int rt_hash_rnd; 241static unsigned int rt_hash_rnd;
242 242
243struct rt_cache_stat *rt_cache_stat; 243static 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
245static int rt_intern_hash(unsigned hash, struct rtable *rth, 247static 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
131void __exit xfrm4_state_fini(void) 132void __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