Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 289e1f4e authored by Anders Roxell's avatar Anders Roxell Committed by David S. Miller
Browse files

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: c04d2cb2 ("ipconfig: Write NTP server IPs to /proc/net/ipconfig/ntp_servers")
Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2d6cee1
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -163,9 +163,6 @@ static u8 ic_domain[64]; /* DNS (not NIS) domain name */
 * Private state.
 * Private state.
 */
 */


/* proc_dir_entry for /proc/net/ipconfig */
static struct proc_dir_entry *ipconfig_dir;

/* Name of user-selected boot device */
/* Name of user-selected boot device */
static char user_dev_name[IFNAMSIZ] __initdata = { 0, };
static char user_dev_name[IFNAMSIZ] __initdata = { 0, };


@@ -1292,6 +1289,8 @@ static int __init ic_dynamic(void)
#endif /* IPCONFIG_DYNAMIC */
#endif /* IPCONFIG_DYNAMIC */


#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
/* proc_dir_entry for /proc/net/ipconfig */
static struct proc_dir_entry *ipconfig_dir;


/* Name servers: */
/* Name servers: */
static int pnp_seq_show(struct seq_file *seq, void *v)
static int pnp_seq_show(struct seq_file *seq, void *v)