diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2018-05-13 21:48:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-13 20:27:25 -0400 |
commit | 289e1f4e9e4a09c73a1c0152bb93855ea351ccda (patch) | |
tree | 0b4bf1bc7767c4d95f6e66601ac34ce7cbdae99e /net/ipv4/ipconfig.c | |
parent | b2d6cee117f708d493c020f9f355297321507be7 (diff) | |
download | linux-289e1f4e9e4a09c73a1c0152bb93855ea351ccda.tar.bz2 |
net: ipv4: ipconfig: fix unused variable
When CONFIG_PROC_FS isn't set, variable ipconfig_dir isn't used.
net/ipv4/ipconfig.c:167:31: warning: ‘ipconfig_dir’ defined but not used [-Wunused-variable]
static struct proc_dir_entry *ipconfig_dir;
^~~~~~~~~~~~
Move the declaration of ipconfig_dir inside the CONFIG_PROC_FS ifdef to
fix the warning.
Fixes: c04d2cb2009f ("ipconfig: Write NTP server IPs to /proc/net/ipconfig/ntp_servers")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipconfig.c')
-rw-r--r-- | net/ipv4/ipconfig.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index d839d74853fc..86c9f755de3d 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -163,9 +163,6 @@ static u8 ic_domain[64]; /* DNS (not NIS) domain name */ * Private state. */ -/* proc_dir_entry for /proc/net/ipconfig */ -static struct proc_dir_entry *ipconfig_dir; - /* Name of user-selected boot device */ static char user_dev_name[IFNAMSIZ] __initdata = { 0, }; @@ -1292,6 +1289,8 @@ static int __init ic_dynamic(void) #endif /* IPCONFIG_DYNAMIC */ #ifdef CONFIG_PROC_FS +/* proc_dir_entry for /proc/net/ipconfig */ +static struct proc_dir_entry *ipconfig_dir; /* Name servers: */ static int pnp_seq_show(struct seq_file *seq, void *v) |