From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80B0B18C35 for ; Mon, 12 Jun 2023 10:28:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0892BC433D2; Mon, 12 Jun 2023 10:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686565736; bh=lR4CLoo5OoBvBxrrLCT340/L35CbBPLJKJcm1d5o/14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W7yJpWkgUfoHaSVh1NSV1fQxDU9RMomTUhgixaYlSDnCaN7Eoay1F3rbq4Prd2iFr k9hZHeAhBxiHfd5qlb0Vfp6UZpj25j1T9FBwwa0HX56hJAqMGymPcOosdRvbpsJxnp Gz1Ff/KNHV3liWTH8IibVE+I/7uOX8tJD3rh8FKc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Eric Dumazet , Jamal Hadi Salim , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 08/21] net: sched: move rtm_tca_policy declaration to include file Date: Mon, 12 Jun 2023 12:26:03 +0200 Message-ID: <20230612101651.352385750@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612101651.048240731@linuxfoundation.org> References: <20230612101651.048240731@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Eric Dumazet [ Upstream commit 886bc7d6ed3357975c5f1d3c784da96000d4bbb4 ] rtm_tca_policy is used from net/sched/sch_api.c and net/sched/cls_api.c, thus should be declared in an include file. This fixes the following sparse warning: net/sched/sch_api.c:1434:25: warning: symbol 'rtm_tca_policy' was not declared. Should it be static? Fixes: e331473fee3d ("net/sched: cls_api: add missing validation of netlink attributes") Signed-off-by: Eric Dumazet Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- include/net/pkt_sched.h | 2 ++ net/sched/cls_api.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index b3869f97d37d7..85e059d3bc233 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -126,6 +126,8 @@ static inline __be16 tc_skb_protocol(const struct sk_buff *skb) return skb->protocol; } +extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1]; + /* Calculate maximal size of packet seen by hard_start_xmit routine of this device. */ diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 32819d1e20754..8808133e78a37 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -31,8 +31,6 @@ #include #include -extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1]; - /* The list of all installed classifier types */ static LIST_HEAD(tcf_proto_base); -- 2.39.2