Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1191994rdb; Fri, 1 Dec 2023 09:12:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzFGPzPSe2BKVBs3zzXmdJFacjxaylz12pf2JYdRSpOOTpdn/S7KyblgXQHCQDYgeaDKLQ X-Received: by 2002:a17:902:e5ce:b0:1cf:dd41:dc8 with SMTP id u14-20020a170902e5ce00b001cfdd410dc8mr16696685plf.13.1701450719889; Fri, 01 Dec 2023 09:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701450719; cv=none; d=google.com; s=arc-20160816; b=PU1A3D4WLlQamHNP3At7nCfQmiWQq22uJH2rnHNLiKcCPbfxsVXgXAzHqRBmKzFTt9 tLw//uJfttb1o16xLNle0Luc5fmtj12HMhVJm1Yo5xe7umgxNLwer5cRMDw+Abwybhjy CssWOLSklLs9ld4dikvoqS+Wb8MlDQqI03hbXRmz+R+gnbc0Kw9TcOcN1Lj8p0Cmf+hG F8/fetz69JXSeXirezhylNdgR/q+Ecge5ABzID4l3une+UIgwyBs8voEaSBWDlulNYt8 AyC0520AvxthB9obnZpPAgc67ZDzbreRA2WzysK2S/+8cRmeCH3KJ8waLiwVJcgLxBlF sb3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=/z2GMSwZ2UNGYr5iLjjY4QG91gNCEh1rLR6YA/r15IU=; fh=/uDJtwnpikhDHchW+BU5DaWKtgJ2QqyhTe++6ujbTY0=; b=kCjuOEUDGadFUDeE7GgkuO9d/isJAf2iIUoS1Jy/bLzbpiaOEkm4t9kDIEWnde/BrW +UeFwhf3HWIOjQ4lbXoJ/1lvv9DCHmUgkfHJL7dQZFFPGBWsXL+i+PVcKbL5SmHS7W7W iB34Bnw7riFFvWG39+haeiRewkhFlNiBp1HqxpX98xS3LG0jx5627335Lh5in7UMoaH0 llvOOLlItr621cXHTWbQ29cgm4Gb9mpqL4cOUT0d8gn1FEz/TvAZWIDVPR0nmQI5ELRH VB54Y7Hqtq78xqNTUrlYLr04QOVtUCtfdHQVEZ5oXANSnuldC5NiMRCaeEsMDA72ukbs ldpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VS+kEXsf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id k7-20020a170902760700b001d04e2f99b6si1832619pll.316.2023.12.01.09.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 09:11:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VS+kEXsf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B18198271768; Fri, 1 Dec 2023 09:11:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378759AbjLARLf (ORCPT + 99 others); Fri, 1 Dec 2023 12:11:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378762AbjLARLd (ORCPT ); Fri, 1 Dec 2023 12:11:33 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 561AC10D; Fri, 1 Dec 2023 09:11:38 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 33608240003; Fri, 1 Dec 2023 17:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701450697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/z2GMSwZ2UNGYr5iLjjY4QG91gNCEh1rLR6YA/r15IU=; b=VS+kEXsfEbj8IFlCLn5iQVx4V5vkUNQ3Q6MBf3zIq1X+CvXWW6Wc/HuuqmDvztos2dKMH0 QJNi54KAhKmBfZ+zlhbD9BK0iXzhAqVYX1Nr2zT3DB5KtcCuAJ0tYtyEA8zPGNEzvdzgon fkk3OTWe0cQ34Ux7TyC+lwEw+/3/CpOZ6ENnnkCdmHUrxD48wuzrlEEOfVI3q+x4qD12ik PmX5/qOoPoTJw+Mt9P83ZjAFNilbeTUwK7J5hqaUoZakwG8RIrmndtS84GKHcOXri4qVTW DVZdhuEGOJuxBfCTv/bxCwHmUgRf+Ykdq4KCQY/UMtkWtJVJROsn8ej52rzvGw== From: Kory Maincent Date: Fri, 01 Dec 2023 18:10:23 +0100 Subject: [PATCH net-next v2 1/8] net: pse-pd: Rectify and adapt the naming of admin_cotrol member of struct pse_control_config MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231201-feature_poe-v2-1-56d8cac607fa@bootlin.com> References: <20231201-feature_poe-v2-0-56d8cac607fa@bootlin.com> In-Reply-To: <20231201-feature_poe-v2-0-56d8cac607fa@bootlin.com> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksij Rempel Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project , Kory Maincent X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 01 Dec 2023 09:11:54 -0800 (PST) In commit 18ff0bcda6d1 ("ethtool: add interface to interact with Ethernet Power Equipment"), the 'pse_control_config' structure was introduced, housing a single member labeled 'admin_cotrol' responsible for maintaining the operational state of the PoDL PSE functions. A noticeable typographical error exists in the naming of this field ('cotrol' should be corrected to 'control'), which this commit aims to rectify. Furthermore, with upcoming extensions of this structure to encompass PoE functionalities, the field is being renamed to 'podl_admin_state' to distinctly indicate that this state is tailored specifically for PoDL." Sponsored-by: Dent Project Signed-off-by: Kory Maincent --- drivers/net/pse-pd/pse_regulator.c | 8 ++++---- include/linux/pse-pd/pse.h | 4 ++-- net/ethtool/pse-pd.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/pse-pd/pse_regulator.c b/drivers/net/pse-pd/pse_regulator.c index e2bf8306ca90..1dedf4de296e 100644 --- a/drivers/net/pse-pd/pse_regulator.c +++ b/drivers/net/pse-pd/pse_regulator.c @@ -31,10 +31,10 @@ pse_reg_ethtool_set_config(struct pse_controller_dev *pcdev, unsigned long id, struct pse_reg_priv *priv = to_pse_reg(pcdev); int ret; - if (priv->admin_state == config->admin_cotrol) + if (priv->admin_state == config->podl_admin_control) return 0; - switch (config->admin_cotrol) { + switch (config->podl_admin_control) { case ETHTOOL_PODL_PSE_ADMIN_STATE_ENABLED: ret = regulator_enable(priv->ps); break; @@ -43,14 +43,14 @@ pse_reg_ethtool_set_config(struct pse_controller_dev *pcdev, unsigned long id, break; default: dev_err(pcdev->dev, "Unknown admin state %i\n", - config->admin_cotrol); + config->podl_admin_control); ret = -ENOTSUPP; } if (ret) return ret; - priv->admin_state = config->admin_cotrol; + priv->admin_state = config->podl_admin_control; return 0; } diff --git a/include/linux/pse-pd/pse.h b/include/linux/pse-pd/pse.h index fb724c65c77b..199cf4ae3cf2 100644 --- a/include/linux/pse-pd/pse.h +++ b/include/linux/pse-pd/pse.h @@ -15,11 +15,11 @@ struct pse_controller_dev; /** * struct pse_control_config - PSE control/channel configuration. * - * @admin_cotrol: set PoDL PSE admin control as described in + * @podl_admin_control: set PoDL PSE admin control as described in * IEEE 802.3-2018 30.15.1.2.1 acPoDLPSEAdminControl */ struct pse_control_config { - enum ethtool_podl_pse_admin_state admin_cotrol; + enum ethtool_podl_pse_admin_state podl_admin_control; }; /** diff --git a/net/ethtool/pse-pd.c b/net/ethtool/pse-pd.c index cc478af77111..aef57a058f0d 100644 --- a/net/ethtool/pse-pd.c +++ b/net/ethtool/pse-pd.c @@ -130,7 +130,7 @@ ethnl_set_pse(struct ethnl_req_info *req_info, struct genl_info *info) struct phy_device *phydev; /* this values are already validated by the ethnl_pse_set_policy */ - config.admin_cotrol = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]); + config.podl_admin_control = nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]); phydev = dev->phydev; if (!phydev) { -- 2.25.1