summaryrefslogtreecommitdiff
path: root/net/sched/act_gate.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-08-18 10:17:31 +0200
committerDavid S. Miller <davem@davemloft.net>2020-08-18 12:28:45 -0700
commit8140860c817f3e9f78bcd1e420b9777ddcbaa629 (patch)
tree071d5135931b32c9a2e62a5fb25cd3b2b5aae6a6 /net/sched/act_gate.c
parent06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd (diff)
netlink: consistently use NLA_POLICY_EXACT_LEN()
Change places that open-code NLA_POLICY_EXACT_LEN() to use the macro instead, giving us flexibility in how we handle the details of the macro. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_gate.c')
-rw-r--r--net/sched/act_gate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_gate.c b/net/sched/act_gate.c
index 1fb8d428d2c1..f5dd4d1d274e 100644
--- a/net/sched/act_gate.c
+++ b/net/sched/act_gate.c
@@ -159,8 +159,8 @@ static const struct nla_policy entry_policy[TCA_GATE_ENTRY_MAX + 1] = {
};
static const struct nla_policy gate_policy[TCA_GATE_MAX + 1] = {
- [TCA_GATE_PARMS] = { .len = sizeof(struct tc_gate),
- .type = NLA_EXACT_LEN },
+ [TCA_GATE_PARMS] =
+ NLA_POLICY_EXACT_LEN(sizeof(struct tc_gate)),
[TCA_GATE_PRIORITY] = { .type = NLA_S32 },
[TCA_GATE_ENTRY_LIST] = { .type = NLA_NESTED },
[TCA_GATE_BASE_TIME] = { .type = NLA_U64 },