netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ipv4: avoid unused variable warning for sysctl
@ 2018-02-28 13:32 Arnd Bergmann
  2018-02-28 14:04 ` Sabrina Dubroca
  2018-03-01 18:38 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-02-28 13:32 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI
  Cc: Jianlin Shi, Sabrina Dubroca, Stefano Brivio, Arnd Bergmann,
	David Ahern, netdev, linux-kernel

The newly introudced ip_min_valid_pmtu variable is only used when
CONFIG_SYSCTL is set:

net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used [-Werror=unused-variable]

This moves it to the other variables like it, to avoid the harmless
warning.

Fixes: c7272c2f1229 ("net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/ipv4/route.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 5c85db355d1f..8d1f5c3a1745 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -132,8 +132,6 @@ static int ip_rt_min_advmss __read_mostly	= 256;
 
 static int ip_rt_gc_timeout __read_mostly	= RT_GC_TIMEOUT;
 
-static int ip_min_valid_pmtu __read_mostly	= IPV4_MIN_MTU;
-
 /*
  *	Interface to generic destination cache.
  */
@@ -2805,6 +2803,7 @@ void ip_rt_multicast_event(struct in_device *in_dev)
 static int ip_rt_gc_interval __read_mostly  = 60 * HZ;
 static int ip_rt_gc_min_interval __read_mostly	= HZ / 2;
 static int ip_rt_gc_elasticity __read_mostly	= 8;
+static int ip_min_valid_pmtu __read_mostly	= IPV4_MIN_MTU;
 
 static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write,
 					void __user *buffer,
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ipv4: avoid unused variable warning for sysctl
  2018-02-28 13:32 [PATCH] net: ipv4: avoid unused variable warning for sysctl Arnd Bergmann
@ 2018-02-28 14:04 ` Sabrina Dubroca
  2018-03-01 18:38 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Sabrina Dubroca @ 2018-02-28 14:04 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI, Jianlin Shi,
	Stefano Brivio, David Ahern, netdev, linux-kernel

2018-02-28, 14:32:48 +0100, Arnd Bergmann wrote:
> The newly introudced ip_min_valid_pmtu variable is only used when
> CONFIG_SYSCTL is set:
> 
> net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used [-Werror=unused-variable]
> 
> This moves it to the other variables like it, to avoid the harmless
> warning.
> 
> Fixes: c7272c2f1229 ("net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Crap. Thanks, and sorry for the mess.

Acked-by: Sabrina Dubroca <sd@queasysnail.net>

-- 
Sabrina

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ipv4: avoid unused variable warning for sysctl
  2018-02-28 13:32 [PATCH] net: ipv4: avoid unused variable warning for sysctl Arnd Bergmann
  2018-02-28 14:04 ` Sabrina Dubroca
@ 2018-03-01 18:38 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-03-01 18:38 UTC (permalink / raw)
  To: arnd; +Cc: kuznet, yoshfuji, jishi, sd, sbrivio, dsahern, netdev,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 28 Feb 2018 14:32:48 +0100

> The newly introudced ip_min_valid_pmtu variable is only used when
> CONFIG_SYSCTL is set:
> 
> net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used [-Werror=unused-variable]
> 
> This moves it to the other variables like it, to avoid the harmless
> warning.
> 
> Fixes: c7272c2f1229 ("net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks Arnd.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-01 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 13:32 [PATCH] net: ipv4: avoid unused variable warning for sysctl Arnd Bergmann
2018-02-28 14:04 ` Sabrina Dubroca
2018-03-01 18:38 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).