Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3257394ybi; Tue, 2 Jul 2019 04:50:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyx6bbVA6hBD9pSr87QcfwTjcawHFKg8mJ8yEipv85eEPYPBqpeXsxpZRDiFTmyXA4k2qDY X-Received: by 2002:a63:c508:: with SMTP id f8mr30892389pgd.48.1562068234645; Tue, 02 Jul 2019 04:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562068234; cv=none; d=google.com; s=arc-20160816; b=v6dFp27zga9AgJhZBUXvkY9clErKg26RIjZg7/b7zcaSJRcWlu51JLOZpZPdqHI2KL ITq+p5ztfyKdMTzMKdPfUTHF6q+ByHQR8yc/mOUKuLA5QMSNtIiBxh1GKAI0tT7NizVa IuRvK/jNtH1CNtYGGQFpc4ZbpqPcAuXLC9UT73w6XsgxiQih9X4RELNqMTrHkgK1lDhd NZfU3PW4uhi3bSCTL9PaFsjoVwt/GOqL/d+zufVVddTY/QESOC1QH+B7q3oYdvTzj5RI rYDwKxCmRthaWozQMZ5tv98eR+Jql5fhPXQozH2WqfTAlTa4EfCf0mFF/Y3shIegqhBD Sh6w== 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=ySZxK0R0L8uoDrQZuEdHg8VzgZ1lAxkc6jVTOKK7rfU=; b=YKra8ZSfmqHhMKBC7oqIM8sa1NdjCUYnBHuFZsLLseXxuLlIBYh7DavGt9pXSBCwxd c95o1WzL+7Sd2GJqwNgPfG3cf74k8n/cnzrrojUvVI5lpnNMkK71SXNif06wsfelfdQy HPpbvDHUXmuaInTUUzsOumCxmBEjUW/K/tQnywxqh1ZrkGTCNAcRgcRsSjAoMxbqloJp EzwOUIxsgesdBoKYYf8IiNM/bttIXD1l2XjVy0ezNYbk/jll40sXDdV0YZI6Ha05sgxb 1OxLPbCsGBpeu//WvhJYoMVQkIcX1Ggk3soh2usIlT9Wwq/BSLe/tPlUVIqPmTOA5ngo aViw== 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 23si3350809pfi.265.2019.07.02.04.50.20; Tue, 02 Jul 2019 04:50:34 -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 S1726896AbfGBLtx (ORCPT + 99 others); Tue, 2 Jul 2019 07:49:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:38322 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725767AbfGBLtv (ORCPT ); Tue, 2 Jul 2019 07:49:51 -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 6E180B05E; Tue, 2 Jul 2019 11:49:49 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 1FBBFE0159; Tue, 2 Jul 2019 13:49:49 +0200 (CEST) Message-Id: In-Reply-To: References: From: Michal Kubecek Subject: [PATCH net-next v6 02/15] 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, 2 Jul 2019 13:49:49 +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 --- 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 e4650e5b64a1..edb36bf29261 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -1736,7 +1736,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 @@ -1759,9 +1759,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 fc83dd179c1a..ac371d40530d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -12707,8 +12707,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.22.0