Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5376070ybl; Tue, 10 Dec 2019 05:08:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyYRg9q+EQ2PF3eiLZ/pcXzGRG00TFxe9GcgtBLJkvWu6LXsgr6UmPgw+N6z4gZJN6haQLC X-Received: by 2002:a9d:6045:: with SMTP id v5mr23983260otj.252.1575983334665; Tue, 10 Dec 2019 05:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575983334; cv=none; d=google.com; s=arc-20160816; b=cb3RhfSk9spujaBq6eE3EbKURmtX+fhLLvYP8UzaG5T6WOoFGptq80aQQ9egvar2XU VQgadMSRFjw5OGUQ/cmrLdovRHJfsoSn94IO3lbz+Ice9ctgm0jo3E0cMoIJbr/a05IF Cv0+5nrWJMJd8XQllh/iH3YhVNwLtkk2ifpky4ff5nL63B+bSfgJNX800UI7N7FcY+NK iix6q1PZapXkqru76vNP4RR39wskax2FApzHzMEF9tIJRllZBW1/c+B9K/62on1PuZJu njqPUM48ArHUVyrEhiHOKCfd5YLRg8c/31xF3VMrJ2BovVE3NEs8ePNTrJ8hO7k40KN3 WiBg== 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=f8DQUI7dqHg/E0X+gdoayxVpp8XAvVINLIBCFSkFy/9lv1e05dSz0YJoz782cjvrvj BgLw7sbOcjC4tkJ84EUzJ/QHy6ON66t+VABb5RQ5Yl2anK3E7AKI/y2d3RMi/CZqpxEi BN6IJ2IagKw297fTeRjR9Dwa8Gl2ch43TDzm5VndWCn+2+AQ0aeuOAH1V86lYyMIXC29 GDu1B5GRBjL7AKEd6H8N8T4oP1p1ZWDSWa6QLyLMx/N4eCkm95ysp172h8XmhDY0IDNs 7te1PGOC9uFI/9NKeSLxyEPzG6yVk44tArtbcWp43lOPXTS92yxyxlfsu6SDMYdfzQkj oBgQ== 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 d16si1847414otc.210.2019.12.10.05.08.42; Tue, 10 Dec 2019 05:08:54 -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 S1727559AbfLJNIC (ORCPT + 99 others); Tue, 10 Dec 2019 08:08:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:49068 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727539AbfLJNIA (ORCPT ); Tue, 10 Dec 2019 08:08:00 -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 A5E31ABD6; Tue, 10 Dec 2019 13:07:58 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 59801E00E0; Tue, 10 Dec 2019 14:07:58 +0100 (CET) Message-Id: <24d3b34bc09a9f32db4df99af58e1ec8abea58f1.1575982069.git.mkubecek@suse.cz> In-Reply-To: References: From: Michal Kubecek Subject: [PATCH net-next v2 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: Tue, 10 Dec 2019 14:07:58 +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