diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-08-18 11:17:31 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-18 22:28:45 +0300 |
commit | 8140860c817f3e9f78bcd1e420b9777ddcbaa629 (patch) | |
tree | 071d5135931b32c9a2e62a5fb25cd3b2b5aae6a6 /net/bridge/br_vlan.c | |
parent | 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd (diff) | |
download | linux-8140860c817f3e9f78bcd1e420b9777ddcbaa629.tar.xz |
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/bridge/br_vlan.c')
-rw-r--r-- | net/bridge/br_vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index f9092c71225f..d2b8737f9fc0 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -1884,8 +1884,8 @@ out_err: } static const struct nla_policy br_vlan_db_policy[BRIDGE_VLANDB_ENTRY_MAX + 1] = { - [BRIDGE_VLANDB_ENTRY_INFO] = { .type = NLA_EXACT_LEN, - .len = sizeof(struct bridge_vlan_info) }, + [BRIDGE_VLANDB_ENTRY_INFO] = + NLA_POLICY_EXACT_LEN(sizeof(struct bridge_vlan_info)), [BRIDGE_VLANDB_ENTRY_RANGE] = { .type = NLA_U16 }, [BRIDGE_VLANDB_ENTRY_STATE] = { .type = NLA_U8 }, [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = { .type = NLA_NESTED }, |