* ipv4: 2.4.2: unused static variables
@ 2001-02-22 13:58 Russell King
2001-02-23 1:37 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2001-02-22 13:58 UTC (permalink / raw)
To: linux-kernel
Hi,
With CONFIG_SYSCTL=n, I get the following warnings:
sysctl_net_ipv4.c:50: warning: `tcp_retr1_max' defined but not used
sysctl_net_ipv4.c:52: warning: `ip_local_port_range_min' defined but not used
sysctl_net_ipv4.c:53: warning: `ip_local_port_range_max' defined but not used
These are defined static in sysctl_net_ipv4.c, and appear to only be
exported via procfs. In other words, you can set them to whatever you
like and the IPv4 stack couldn't care less.
Why do we have them? If they're not used, can we either eliminate them,
or else move their definition within the '#ifdef CONFIG_SYSCTL' to
eliminate the warning?
Thanks.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ipv4: 2.4.2: unused static variables
2001-02-22 13:58 ipv4: 2.4.2: unused static variables Russell King
@ 2001-02-23 1:37 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2001-02-23 1:37 UTC (permalink / raw)
To: Russell King; +Cc: linux-kernel
Russell King writes:
> With CONFIG_SYSCTL=n, I get the following warnings:
>
> sysctl_net_ipv4.c:50: warning: `tcp_retr1_max' defined but not used
> sysctl_net_ipv4.c:52: warning: `ip_local_port_range_min' defined but not used
> sysctl_net_ipv4.c:53: warning: `ip_local_port_range_max' defined but not used
>
> These are defined static in sysctl_net_ipv4.c, and appear to only be
> exported via procfs. In other words, you can set them to whatever you
> like and the IPv4 stack couldn't care less.
>
> Why do we have them? If they're not used, can we either eliminate them,
> or else move their definition within the '#ifdef CONFIG_SYSCTL' to
> eliminate the warning?
They aren't set to anything because they are not sysctl
"values", they are sysctl "limits". Ie. they tell the sysctl
layer what legal range the user's setting of a particular sysctl
must reside in.
The fix is to enclose these things in CONFIG_SYSCTL, which I have
done in my tree, thanks for bringing this to my attention.
Later,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-23 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-22 13:58 ipv4: 2.4.2: unused static variables Russell King
2001-02-23 1:37 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox