Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1423308ybp; Wed, 9 Oct 2019 13:59:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOK9ORwUWnEJwNTmd7pGVS/hwwahrnDYI+KaFxWxbUa2vR3O5KYwASZmJBta9uvN2Qp7hr X-Received: by 2002:aa7:cf12:: with SMTP id a18mr4917341edy.278.1570654788292; Wed, 09 Oct 2019 13:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570654788; cv=none; d=google.com; s=arc-20160816; b=mgNrm0KB8bxC2S2H8QDMMumXsbxDazSp/D3H5B5mG2eYkFu3e7pKtYJJchL98Q8QwS lVu2V7RKCBiqNq/mdmaZVuImDggCkjzeiAGggOHxqVJcDUbp08LrGEYjuyi/RYVtiWMv BxLG+5WXNtSP74m/iY3OPdFf1xML/DdkY5z4P4S27P5pHbNmPlQL8IDhceawYbWqtQxg WiJeT5KoZfsQj52d62C/4rR270wY39h2wrvYV65rWbGG0QtdOTpiLj/BbXu76bl/oJKs oD+Got9cgrg4tnhDmFu0YKmKctIF5PW2HEt35xCx2nKieopAhDWB74XxLcveG6GCZvRd Gfig== 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=FBPCysYhmhzz30dYYX/jZJHOxYy/XwT2J/mx4adYl70=; b=e2/Ei8OIPztAizDG22fT4K7HCwDuwdVSIobKlqF5G3uCEgV4/vbE59tCEHp1kRXUrh +WO6Tn71Nc11D+BuS6XHPPfX9fLfI9wXOA1SKo8CmfQ1gChymKsyjsR94t12EAQIbM6Y XLNuvKoLB9V8pA6u3Wma8pma5i2JS4e01SIw+Fs7qupcV7CiwU3k4GQP0plEbvkVvOQQ 9t4XpndlPTBOxtqsX7ecAGXuUbsHUw1pmtjX/lOKV7KWstTsgTEPE7f2K3fe/OnEUAw3 IMgauXEOFleIB8dsTqQwdIRe3wBEAimRsFHhgOG/T5s7P11+rlnCPiklyszOjXu2rkNX UCog== 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 ch13si1831092ejb.203.2019.10.09.13.59.25; Wed, 09 Oct 2019 13:59:48 -0700 (PDT) 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 S1732083AbfJIU7K (ORCPT + 99 others); Wed, 9 Oct 2019 16:59:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:51310 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731996AbfJIU7I (ORCPT ); Wed, 9 Oct 2019 16:59:08 -0400 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 128CAB234; Wed, 9 Oct 2019 20:59:07 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id B7C0DE3785; Wed, 9 Oct 2019 22:59:06 +0200 (CEST) Message-Id: <3f6d4d0eb98bdd78269439174d483b011c330c90.1570654310.git.mkubecek@suse.cz> In-Reply-To: References: From: Michal Kubecek Subject: [PATCH net-next v7 02/17] 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, 9 Oct 2019 22:59:06 +0200 (CEST) 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 141cdb171665..b551db41aa8a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -12891,8 +12891,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.23.0