From patchwork Fri Jul 23 09:15:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 484590 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1144803jao; Fri, 23 Jul 2021 02:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgIYypcsDrQKYygrWYPf6yQrk/H5dBbfqJ2U9pM05tA+mtP2UIHUBuWQrdAIB5GQ3c758r X-Received: by 2002:a92:d24d:: with SMTP id v13mr2991304ilg.238.1627031767970; Fri, 23 Jul 2021 02:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627031767; cv=none; d=google.com; s=arc-20160816; b=Hpim3qhHiUBszT23G0UCAch0ihCG8ghtqph44ErwG66Mhxe6vJ+lnsRr14V9jksibY ZQOKkmgGkBqabDKxvH6tNDU52Mp5kpmvzxp8F2C4NBBInTZwgS02cc+YnuLj+YQD9Hfz ItFoRFCzCc9m7OkGi/bowOhBDgiPatfsVZUiMOLU/7hFTHeUqdO3y+D38CSbtnwWt+dC gfz1WJcK7PLk8PtoVGxJhufeRQvF/RVya3Pzdze/t/n2yCOV/uazOF8scFj7QZicZBNd OZrRJPOkliTpv8vG+TEcdsOfy8m24T6sv9KLBwNyEVz1FKp6G9srNcod+Lwg3Re5JE7N vngw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Nyu/5mbgQapaSSO6we/hsf3oBTCAr2+N8s+3S+o4gTM=; b=J3E62qIT2xddG3Bvb2WFU5DliZZn7R9uDVZdpagWLa+x26D9UaDxsIxevCkU8upjeo wdSZJ4M3DUy2D3A1Rnj5qFDLdJEXCPC1Sgi8ww5pTOWNMKzOLKHq6DEMXrSPHFIL/dGp QAHtEc9b9QSPVRvT+uy3wH+FNLY4Ae+cKef6TPEWl9d5ggBfPj4Bdv9iWKO5AsLs0ddy OmPt0L7/U0Pt7M4sI3AM+p9L0B1inWkXPYQ+q3Rn4uzlJ+/pOVJaqs7Y4zyGSieY2ls6 T728FqV4Do7sYxGw2Ssy4NGfvTPXEhWImvuyhGbkXvO4iU4z/ym3vdGW6vt8PFvTvaUl fkrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VxOKFweE; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si34866373jaj.20.2021.07.23.02.16.07; Fri, 23 Jul 2021 02:16:07 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VxOKFweE; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234594AbhGWIfa (ORCPT + 8 others); Fri, 23 Jul 2021 04:35:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:53902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232370AbhGWIf2 (ORCPT ); Fri, 23 Jul 2021 04:35:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2281A60EC0; Fri, 23 Jul 2021 09:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627031761; bh=R/tUNmGg+pjjdMkzRzL/1GJuqdzUtLr2Uhdivnec1/o=; h=From:To:Cc:Subject:Date:From; b=VxOKFweETR1//8RQLzgJ0MrOo3M0d67tmtbJGVUk0n5DwPbgWeEXngZeYczNF5mME Z6Z87jumcJ7rcDk3gYqQjpkcRpzVGHPl4eaD1gz9ooLRFGMKbD3n6cCo40qEvwIHqK D+UdUnV61g84F5GpDJl9XiZ2zxVhxXKfuQ0CanEab8lYFVMyB7huNq97mft1MwOwJx Fn8SpMjuPPrUQZmhSnqv4X8P4EEfXg+clkd4IYJYROzctdDEe/B9j5Pzyd+tghfizS ADTHeVs7FVYvXm+yVU1KIKaJ+mqG4OBa44VeGW+ho1c5M64AJDXNcPdhmxcSZ+K4Wy 6cWyKh/OGD+gQ== From: Arnd Bergmann To: "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Justin Iurman Cc: Arnd Bergmann , Xin Long , Matteo Croce , Florent Fourcot , Taehee Yoo , Rocco Yue , Stephen Hemminger , Praveen Chaudhary , 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 Message-Id: <20210723091556.1740686-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann 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 --- net/ipv6/addrconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.29.2 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",