Skip to content

Commit 32d5109

Browse files
mkubecekdavem330
authored andcommitted
netlink: rename nl80211_validate_nested() to nla_validate_nested()
Function nl80211_validate_nested() is not specific to nl80211, it's a counterpart to nla_validate_nested_deprecated() with strict validation. For consistency with other validation and parse functions, rename it to nla_validate_nested(). Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f74877a commit 32d5109

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎include/net/netlink.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
17351735
}
17361736

17371737
/**
1738-
* nla_validate_nested - Validate a stream of nested attributes
1738+
* __nla_validate_nested - Validate a stream of nested attributes
17391739
* @start: container attribute
17401740
* @maxtype: maximum attribute type to be expected
17411741
* @policy: validation policy
@@ -1758,9 +1758,9 @@ static inline int __nla_validate_nested(const struct nlattr *start, int maxtype,
17581758
}
17591759

17601760
static inline int
1761-
nl80211_validate_nested(const struct nlattr *start, int maxtype,
1762-
const struct nla_policy *policy,
1763-
struct netlink_ext_ack *extack)
1761+
nla_validate_nested(const struct nlattr *start, int maxtype,
1762+
const struct nla_policy *policy,
1763+
struct netlink_ext_ack *extack)
17641764
{
17651765
return __nla_validate_nested(start, maxtype, policy,
17661766
NL_VALIDATE_STRICT, extack);

‎net/wireless/nl80211.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12900,8 +12900,7 @@ static int nl80211_vendor_check_policy(const struct wiphy_vendor_command *vcmd,
1290012900
return -EINVAL;
1290112901
}
1290212902

12903-
return nl80211_validate_nested(attr, vcmd->maxattr, vcmd->policy,
12904-
extack);
12903+
return nla_validate_nested(attr, vcmd->maxattr, vcmd->policy, extack);
1290512904
}
1290612905

1290712906
static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info)

0 commit comments

Comments
 (0)