]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ipv4: ipconfig: avoid unused ic_proto_used symbol
authorArnd Bergmann <arnd@arndb.de>
Thu, 28 Jan 2016 16:39:24 +0000 (17:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jan 2016 03:39:09 +0000 (19:39 -0800)
commit52b79e2bdf92b07b37c805c50811eaf69a33683d
tree7842331eee04f3c87eacb5b4628012e0d65f9519
parent0260a2f4e2cabb998f5add733e042a7375bca3b4
ipv4: ipconfig: avoid unused ic_proto_used symbol

When CONFIG_PROC_FS, CONFIG_IP_PNP_BOOTP, CONFIG_IP_PNP_DHCP and
CONFIG_IP_PNP_RARP are all disabled, we get a warning about the
ic_proto_used variable being unused:

net/ipv4/ipconfig.c:146:12: error: 'ic_proto_used' defined but not used [-Werror=unused-variable]

This avoids the warning, by making the definition conditional on
whether a dynamic IP configuration protocol is configured. If not,
we know that the value is always zero, so we can optimize away the
variable and all code that depends on it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c