From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD314C7EE25 for ; Mon, 12 Jun 2023 10:44:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232111AbjFLKo1 (ORCPT ); Mon, 12 Jun 2023 06:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235077AbjFLKoE (ORCPT ); Mon, 12 Jun 2023 06:44:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA840E564 for ; Mon, 12 Jun 2023 03:28:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA777622B1 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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