Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michal Kubecek and committed by
David S. Miller
32d5109a f74877a5

+5 -6
+4 -4
include/net/netlink.h
··· 1735 1735 } 1736 1736 1737 1737 /** 1738 - * nla_validate_nested - Validate a stream of nested attributes 1738 + * __nla_validate_nested - Validate a stream of nested attributes 1739 1739 * @start: container attribute 1740 1740 * @maxtype: maximum attribute type to be expected 1741 1741 * @policy: validation policy ··· 1758 1758 } 1759 1759 1760 1760 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) 1764 1764 { 1765 1765 return __nla_validate_nested(start, maxtype, policy, 1766 1766 NL_VALIDATE_STRICT, extack);
+1 -2
net/wireless/nl80211.c
··· 12900 12900 return -EINVAL; 12901 12901 } 12902 12902 12903 - return nl80211_validate_nested(attr, vcmd->maxattr, vcmd->policy, 12904 - extack); 12903 + return nla_validate_nested(attr, vcmd->maxattr, vcmd->policy, extack); 12905 12904 } 12906 12905 12907 12906 static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info)