All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Justin Iurman <justin.iurman@uliege.be>
Cc: Arnd Bergmann <arnd@arndb.de>, Xin Long <lucien.xin@gmail.com>,
	Matteo Croce <mcroce@microsoft.com>,
	Florent Fourcot <florent.fourcot@wifirst.fr>,
	Taehee Yoo <ap420073@gmail.com>,
	Rocco Yue <rocco.yue@mediatek.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Praveen Chaudhary <praveen5582@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ipv6: ioam: fix unused function warning
Date: Fri, 23 Jul 2021 11:15:52 +0200	[thread overview]
Message-ID: <20210723091556.1740686-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.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@arndb.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


                 reply	other threads:[~2021-07-23  9:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210723091556.1740686-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=ap420073@gmail.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=florent.fourcot@wifirst.fr \
    --cc=justin.iurman@uliege.be \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=mcroce@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=praveen5582@gmail.com \
    --cc=rocco.yue@mediatek.com \
    --cc=stephen@networkplumber.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.