diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-02-18 19:43:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-19 13:18:13 -0500 |
commit | 082c7ca42b0bf33aa3fb5eeb619dfbcfaa20d216 (patch) | |
tree | dd5a57d3ab10874d9bca9856e2c61622d7c23ec8 /net/ipv4/route.c | |
parent | 4fc1a601f147abe3bfb4d70fe718110ed21953e1 (diff) |
net: ipv4: fix waring -Wunused-variable
the vars ip_rt_gc_timeout is used only when
CONFIG_SYSCTL is selected.
move these vars into CONFIG_SYSCTL.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 3bdd1b1ad1b3..6e2851464f8f 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -117,15 +117,11 @@ | |||
117 | #define RT_GC_TIMEOUT (300*HZ) | 117 | #define RT_GC_TIMEOUT (300*HZ) |
118 | 118 | ||
119 | static int ip_rt_max_size; | 119 | static int ip_rt_max_size; |
120 | static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT; | ||
121 | static int ip_rt_gc_interval __read_mostly = 60 * HZ; | ||
122 | static int ip_rt_gc_min_interval __read_mostly = HZ / 2; | ||
123 | static int ip_rt_redirect_number __read_mostly = 9; | 120 | static int ip_rt_redirect_number __read_mostly = 9; |
124 | static int ip_rt_redirect_load __read_mostly = HZ / 50; | 121 | static int ip_rt_redirect_load __read_mostly = HZ / 50; |
125 | static int ip_rt_redirect_silence __read_mostly = ((HZ / 50) << (9 + 1)); | 122 | static int ip_rt_redirect_silence __read_mostly = ((HZ / 50) << (9 + 1)); |
126 | static int ip_rt_error_cost __read_mostly = HZ; | 123 | static int ip_rt_error_cost __read_mostly = HZ; |
127 | static int ip_rt_error_burst __read_mostly = 5 * HZ; | 124 | static int ip_rt_error_burst __read_mostly = 5 * HZ; |
128 | static int ip_rt_gc_elasticity __read_mostly = 8; | ||
129 | static int ip_rt_mtu_expires __read_mostly = 10 * 60 * HZ; | 125 | static int ip_rt_mtu_expires __read_mostly = 10 * 60 * HZ; |
130 | static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20; | 126 | static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20; |
131 | static int ip_rt_min_advmss __read_mostly = 256; | 127 | static int ip_rt_min_advmss __read_mostly = 256; |
@@ -2423,6 +2419,11 @@ void ip_rt_multicast_event(struct in_device *in_dev) | |||
2423 | } | 2419 | } |
2424 | 2420 | ||
2425 | #ifdef CONFIG_SYSCTL | 2421 | #ifdef CONFIG_SYSCTL |
2422 | static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT; | ||
2423 | static int ip_rt_gc_interval __read_mostly = 60 * HZ; | ||
2424 | static int ip_rt_gc_min_interval __read_mostly = HZ / 2; | ||
2425 | static int ip_rt_gc_elasticity __read_mostly = 8; | ||
2426 | |||
2426 | static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, | 2427 | static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, |
2427 | void __user *buffer, | 2428 | void __user *buffer, |
2428 | size_t *lenp, loff_t *ppos) | 2429 | size_t *lenp, loff_t *ppos) |