Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp424898ybl; Wed, 11 Dec 2019 01:59:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwOmpq2OU9DygSp0khBVkr6JbhWnZcxbB3Qxs6b/JJrCd3LEaiDP+Fekpo6hj28iHiGSFB8 X-Received: by 2002:aca:4850:: with SMTP id v77mr1997826oia.70.1576058344358; Wed, 11 Dec 2019 01:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576058344; cv=none; d=google.com; s=arc-20160816; b=qAaxFtbKnR87nJHWn+SYWXxFWmuMQRcgpTYSYfyPD2/+tHVXlbpYthvxT6tNMLjK3p kR1oB5tmc9Ve4ycfZayA4RbOoA+7sIokgBwScjlnP6+2HX8FiIQnuMsM4RYEnAPOCE7c GsPCDvFtISF3RfNQSnlUfaDdibRcfPOqdaF0eP86Jw1xa055xgWfiaZF4s41Adkra4AV 2OD3O0jqnMUzELiy1+BuryJxhH1DqQpwOjZqRwG/O31RiFwVw/0pS71UBobDGcrOVAo2 L3+occBAjMOfUraSM6wSQIs19wDYpTGza+qMsIVWdSuoaw//YkwzQBap/d/4oL5SbDpt CqhA== 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=0rULH2w8gjo3qpAbTtS41xOIh8O/CzZ0cpe5wSYfiKCGAM+dNiHRjBEkVCisymrEY6 3Q5q9Jk0jQdk5SelFGAC9XzsX+PpapRQcYHW5bmwx9m4zlBwPiUHGrosZUtXe0SbydRr io0rXSbYCATbJH0JklOhFB7x6ftduvBkXGC0NlEmIeYALnzKYro33v3z0wOGuKq9gld2 pvBIKVPa403XADPvrU2HgKirRZ5BAId/1FYOM13dvOWLRluoFPY0PuR/WR2QJpZ5bp25 EdEKaYlugRAAI89tqXZKp15FAAikqKUUvFfj1+NmNp2ZVtXva2F/0ib21oGbzP/IoSyK zwnQ== 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 x24si764784otk.188.2019.12.11.01.58.50; Wed, 11 Dec 2019 01:59:04 -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 S1728656AbfLKJ6W (ORCPT + 99 others); Wed, 11 Dec 2019 04:58:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:58220 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727829AbfLKJ6V (ORCPT ); Wed, 11 Dec 2019 04:58:21 -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 CDE95AFE8; Wed, 11 Dec 2019 09:58:19 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 7F585E00B7; Wed, 11 Dec 2019 10:58:19 +0100 (CET) Message-Id: In-Reply-To: References: From: Michal Kubecek Subject: [PATCH net-next v3 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: Wed, 11 Dec 2019 10:58:19 +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