Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4504800ybl; Mon, 9 Dec 2019 11:56:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzE52C6VFxZlL8zYUoZ+fddvmwOUEYI9jyoqbFTCvu1xti+ACclEtI8RRa20vcYpef4l0eK X-Received: by 2002:a9d:6005:: with SMTP id h5mr24283007otj.153.1575921378574; Mon, 09 Dec 2019 11:56:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575921378; cv=none; d=google.com; s=arc-20160816; b=F6Prf2xye9u7PENTtPejWb/TpZ9HKNDU7VU8hdZXzYeI61+yFisrCwJbHdevpEHivU dsOCdCzFzRjsCOKsbeTVBu6Mp3A4wneUZFVWAAF726d1l8r+hxe67QqJmyEspw7NpOXY UJUBu0awnp11ipZoL1W/arlZyD4AnTfxboBj+6Po2iAzKTlS72KgpeKetHtLb+EOZQBB +QYzOR8TXhhUzcGmJY9SVAOOW8JgcSinMESKyfHC9G21zqxlmEvrps5mMfURDXm4JyRr waNFlt/YKWmt6Ycvu+ydDUJD8oY60AGPdbOkcTMLFw4AHo7ASz7kquV495/G98LvEJ2q ZaCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id; bh=V9jxR7w3RwANuz6ir9Uojy5mjHsRPcXqPzMQtBS1zj8=; b=iIT+Mcku85RbRVg2IrlAJbzUtNpNv2UYLf7Md2F6xFnSC+PGqKaFNP+afRuUq7Y3lZ zAStx8Bx+OBhMONEO11jMButjub1nUYkbZ75VT5Cc7zysS3g3qgFG8y4HD9MZMpcxLb+ zTBq3mFcXiY843aJjXtRCjID6eDY16iRAKtPS75+GsgGZI5qLwSK0P7nxjlMvEmfvNo7 00jl8HkN703PpY+mek1zcgXQ4qKXXlxpBscl0VaRiZBrSl2EzSyL+D/8bGfCBMYHeNhk 1zSq5r4L+Z92bUch+R682WxanysEMj1VmXpoDI5Qjtbkjv9X7Jr9cje59y/hIKA2DNO1 y2MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v76si553387oif.207.2019.12.09.11.56.06; Mon, 09 Dec 2019 11:56:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726879AbfLITzd (ORCPT + 99 others); Mon, 9 Dec 2019 14:55:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:43400 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726354AbfLITzc (ORCPT ); Mon, 9 Dec 2019 14:55:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4966AAF84; Mon, 9 Dec 2019 19:55:30 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id F0642E0321; Mon, 9 Dec 2019 20:55:29 +0100 (CET) Message-Id: <4ed84a09e72ce1521ef7552f0a528ae0be343b4a.1575920565.git.mkubecek@suse.cz> In-Reply-To: References: From: Michal Kubecek Subject: [PATCH net-next 2/5] netlink: rename nl80211_validate_nested() to nla_validate_nested() To: David Miller , netdev@vger.kernel.org Cc: Jakub Kicinski , Jiri Pirko , Andrew Lunn , Florian Fainelli , John Linville , Stephen Hemminger , Johannes Berg , linux-kernel@vger.kernel.org Date: Mon, 9 Dec 2019 20:55:29 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Jiri Pirko Reviewed-by: Johannes Berg --- include/net/netlink.h | 8 ++++---- net/wireless/nl80211.c | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/net/netlink.h b/include/net/netlink.h index b140c8f1be22..56c365dc6dc7 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -1735,7 +1735,7 @@ static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) } /** - * nla_validate_nested - Validate a stream of nested attributes + * __nla_validate_nested - Validate a stream of nested attributes * @start: container attribute * @maxtype: maximum attribute type to be expected * @policy: validation policy @@ -1758,9 +1758,9 @@ static inline int __nla_validate_nested(const struct nlattr *start, int maxtype, } static inline int -nl80211_validate_nested(const struct nlattr *start, int maxtype, - const struct nla_policy *policy, - struct netlink_ext_ack *extack) +nla_validate_nested(const struct nlattr *start, int maxtype, + const struct nla_policy *policy, + struct netlink_ext_ack *extack) { return __nla_validate_nested(start, maxtype, policy, NL_VALIDATE_STRICT, extack); diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index da5262b2298b..fa3526592c51 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -12900,8 +12900,7 @@ static int nl80211_vendor_check_policy(const struct wiphy_vendor_command *vcmd, return -EINVAL; } - return nl80211_validate_nested(attr, vcmd->maxattr, vcmd->policy, - extack); + return nla_validate_nested(attr, vcmd->maxattr, vcmd->policy, extack); } static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info) -- 2.24.0