Skip to content

Commit

Permalink
net: sched: move rtm_tca_policy declaration to include file
Browse files Browse the repository at this point in the history
[ Upstream commit 886bc7d ]

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: e331473 ("net/sched: cls_api: add missing validation of netlink attributes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Eric Dumazet authored and gregkh committed Jun 14, 2023
1 parent 76eef45 commit 60f3976
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/net/pkt_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ static inline void qdisc_run(struct Qdisc *q)
}
}

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.
*/
Expand Down
2 changes: 0 additions & 2 deletions net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
#include <net/tc_act/tc_gate.h>
#include <net/flow_offload.h>

extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1];

/* The list of all installed classifier types */
static LIST_HEAD(tcf_proto_base);

Expand Down

0 comments on commit 60f3976

Please sign in to comment.