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 /net | |
| 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>
Diffstat (limited to 'net')
| -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 |
8 files changed, 7 insertions, 15 deletions
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 | ||
