Skip to contentSkip to conversation

net: sysctl_net_core: remove unused variable one

PATCH In review Dirk Behme 2 participants 4 messages Apr 26, 2015 Stable branch

lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 net: sysctl_net_core: remove unused variable one

Back porting the upstream commit b1cb59cf2efe7 ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length") to -stable introduces a compiler warning

net/core/sysctl_net_core.c:26:12: warning: ‘one’ defined but not used [-Wunused-variable]
static int one = 1;

While upstream has an additional user of the variable 'one' after that commit ("tstamp_allow_data"), -stable doesn't have any user of 'one' any more, resulting in above compiler warning. Or in other words: -stable doesn't have the commit b245be1f4db1a0 ("net-timestamp: no-payload only sysctl") introducing the additional user of 'one'.

Fix the compiler warning by removing the unused variable.

---

Note: This has been observed on 3.14.y. Having a quick look through the logs it
should apply to all -stable branches from 3.19.y to 3.10.y.

 net/core/sysctl_net_core.c | 1 -
 1 file changed, 1 deletion(-)
net/core/sysctl_net_core.c +0 -1
index e731c96..8725b91 100644
@@ -23,7 +23,6 @@
 #include <net/pkt_sched.h>
 
 static int zero = 0;
-static int one = 1;
 static int ushort_max = USHRT_MAX;
 static int min_sndbuf = SOCK_MIN_SNDBUF;
 static int min_rcvbuf = SOCK_MIN_RCVBUF;
Signature · 1 line
2.3.6
maintainer
#1 lore raw
Quoted 6 lines · Dirk Behme

Back porting the upstream commit b1cb59cf2efe7 ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length") to -stable introduces a compiler warning

net/core/sysctl_net_core.c:26:12: warning: ‘one’ defined but not used [-Wunused-variable]
static int one = 1;

Quoted 7 lines

While upstream has an additional user of the variable 'one' after that commit ("tstamp_allow_data"), -stable doesn't have any user of 'one' any more, resulting in above compiler warning. Or in other words: -stable doesn't have the commit b245be1f4db1a0 ("net-timestamp: no-payload only sysctl") introducing the additional user of 'one'.

Fix the compiler warning by removing the unused variable.

No, this was done on purpose, sorry, I can't take this patch. The network maintainer wants it this way to be easier to backport things.

We can live with the compiler warning.

thanks,

greg k-h

author
#2 lore raw
Quoted 13 lines · Greg KH
Quoted 12 lines · Dirk Behme

Back porting the upstream commit b1cb59cf2efe7 ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length") to -stable introduces a compiler warning

net/core/sysctl_net_core.c:26:12: warning: ‘one’ defined but not used [-Wunused-variable]
static int one = 1;

While upstream has an additional user of the variable 'one' after that commit ("tstamp_allow_data"), -stable doesn't have any user of 'one' any more, resulting in above compiler warning. Or in other words: -stable doesn't have the commit b245be1f4db1a0 ("net-timestamp: no-payload only sysctl") introducing the additional user of 'one'.

Quoted 6 lines
Quoted 1 line

Fix the compiler warning by removing the unused variable.

No, this was done on purpose, sorry, I can't take this patch. The network maintainer wants it this way to be easier to backport things.

We can live with the compiler warning.

Would it be an option to pick

b245be1f4db1a0 ("net-timestamp: no-payload only sysctl")

then, too?

Thanks

Dirk

maintainer
#3 lore raw
Quoted 19 lines · Dirk Behme
Quoted 18 lines · Greg KH
Quoted 6 lines · Dirk Behme

Back porting the upstream commit b1cb59cf2efe7 ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length") to -stable introduces a compiler warning

net/core/sysctl_net_core.c:26:12: warning: ‘one’ defined but not used [-Wunused-variable]
static int one = 1;

Quoted 7 lines

While upstream has an additional user of the variable 'one' after that commit ("tstamp_allow_data"), -stable doesn't have any user of 'one' any more, resulting in above compiler warning. Or in other words: -stable doesn't have the commit b245be1f4db1a0 ("net-timestamp: no-payload only sysctl") introducing the additional user of 'one'.

Fix the compiler warning by removing the unused variable.

No, this was done on purpose, sorry, I can't take this patch. The network maintainer wants it this way to be easier to backport things.

Quoted 7 lines
Quoted 1 line

We can live with the compiler warning.

Would it be an option to pick

b245be1f4db1a0 ("net-timestamp: no-payload only sysctl")

then, too?

That's a new feature, which isn't ok for stable kernels, right?

Also, the networking mailing list and maintainer needs to be asked about networking stable patches, not me, it's up to him what he wants to see applied to the stable kernels.

thanks,

greg k-h