diff options
author | Cong Wang <amwang@redhat.com> | 2012-12-05 21:04:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-05 21:50:37 -0500 |
commit | b93196dc5af7729ff7cc50d3d322ab1a364aa14f (patch) | |
tree | 5bcd0c82a03b17be2640bc2f8843992382c828eb | |
parent | c2d3babfafbb9f6629cfb47139758e59a5eb0d80 (diff) |
net: fix some compiler warning in net/core/neighbour.c
net/core/neighbour.c:65:12: warning: 'zero' defined but not used [-Wunused-variable]
net/core/neighbour.c:66:12: warning: 'unres_qlen_max' defined but not used [-Wunused-variable]
These variables are only used when CONFIG_SYSCTL is defined,
so move them under #ifdef CONFIG_SYSCTL.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/neighbour.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 36fc692e2bde..c815f285e5ab 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -62,9 +62,6 @@ static void __neigh_notify(struct neighbour *n, int type, int flags); | |||
62 | static void neigh_update_notify(struct neighbour *neigh); | 62 | static void neigh_update_notify(struct neighbour *neigh); |
63 | static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev); | 63 | static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev); |
64 | 64 | ||
65 | static int zero; | ||
66 | static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); | ||
67 | |||
68 | static struct neigh_table *neigh_tables; | 65 | static struct neigh_table *neigh_tables; |
69 | #ifdef CONFIG_PROC_FS | 66 | #ifdef CONFIG_PROC_FS |
70 | static const struct file_operations neigh_stat_seq_fops; | 67 | static const struct file_operations neigh_stat_seq_fops; |
@@ -2772,6 +2769,8 @@ EXPORT_SYMBOL(neigh_app_ns); | |||
2772 | #endif /* CONFIG_ARPD */ | 2769 | #endif /* CONFIG_ARPD */ |
2773 | 2770 | ||
2774 | #ifdef CONFIG_SYSCTL | 2771 | #ifdef CONFIG_SYSCTL |
2772 | static int zero; | ||
2773 | static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); | ||
2775 | 2774 | ||
2776 | static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer, | 2775 | static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer, |
2777 | size_t *lenp, loff_t *ppos) | 2776 | size_t *lenp, loff_t *ppos) |