Skip to content

Commit 886bc7d

Browse files
Eric Dumazetdavem330
Eric Dumazet
authored andcommitted
net: sched: move rtm_tca_policy declaration to include file
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 <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bf15bb3 commit 886bc7d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/net/pkt_sched.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ static inline void qdisc_run(struct Qdisc *q)
127127
}
128128
}
129129

130+
extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1];
131+
130132
/* Calculate maximal size of packet seen by hard_start_xmit
131133
routine of this device.
132134
*/

net/sched/cls_api.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
#include <net/flow_offload.h>
4444
#include <net/tc_wrapper.h>
4545

46-
extern const struct nla_policy rtm_tca_policy[TCA_MAX + 1];
47-
4846
/* The list of all installed classifier types */
4947
static LIST_HEAD(tcf_proto_base);
5048

0 commit comments

Comments
 (0)