lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210723091556.1740686-1-arnd@kernel.org>
Date:   Fri, 23 Jul 2021 11:15:52 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Justin Iurman <justin.iurman@...ege.be>
Cc:     Arnd Bergmann <arnd@...db.de>, Xin Long <lucien.xin@...il.com>,
        Matteo Croce <mcroce@...rosoft.com>,
        Florent Fourcot <florent.fourcot@...irst.fr>,
        Taehee Yoo <ap420073@...il.com>,
        Rocco Yue <rocco.yue@...iatek.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Praveen Chaudhary <praveen5582@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ipv6: ioam: fix unused function warning

From: Arnd Bergmann <arnd@...db.de>

ioam6_if_id_max is defined globally but used only when
CONFIG_SYSCTL is enabled:

net/ipv6/addrconf.c:99:12: error: 'ioam6_if_id_max' defined but not used [-Werror=unused-variable]

Move the variable definition closer to the usage inside of the
same #ifdef.

Fixes: 9ee11f0fff20 ("ipv6: ioam: Data plane support for Pre-allocated Trace")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 net/ipv6/addrconf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1802287977f1..cd3171749622 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -96,8 +96,6 @@
 #define IPV6_MAX_STRLEN \
 	sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
 
-static u32 ioam6_if_id_max = U16_MAX;
-
 static inline u32 cstamp_delta(unsigned long cstamp)
 {
 	return (cstamp - INITIAL_JIFFIES) * 100UL / HZ;
@@ -6551,6 +6549,8 @@ static int addrconf_sysctl_disable_policy(struct ctl_table *ctl, int write,
 static int minus_one = -1;
 static const int two_five_five = 255;
 
+static u32 ioam6_if_id_max = U16_MAX;
+
 static const struct ctl_table addrconf_sysctl[] = {
 	{
 		.procname	= "forwarding",
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ