Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3295108rdb; Thu, 16 Nov 2023 06:02:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1PGhRKR/n+qacMowf7Eef8SWwrcRPRJR9NsaJpIHC90XQ8jQ4nuiStk1Hc23zPGrD2ogq X-Received: by 2002:a05:6808:1145:b0:3ab:8956:ada4 with SMTP id u5-20020a056808114500b003ab8956ada4mr20412573oiu.10.1700143331235; Thu, 16 Nov 2023 06:02:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700143331; cv=none; d=google.com; s=arc-20160816; b=D7EmQfO9YUAIg2Ek/y7fp6m1KDas5yNAZEiEjpW7JUld5D25kysKu01sZkGl/M+bi/ kiJ8orBXSSGStrgQVtNxWLkbMXt3FnfUedy6KLJy9GRPNddcbtG/oC/3po0sUBPUOkq9 Cp8kdm6o5cXVy/zhU9BBdC+C3KspZN5yhzRtq8waZsC660SSm85utRJlyRD6yyzy6XeS DB1WhbwtCfDLi2q/j+gIE1s4r6Dge03gjdGURNW+8hDWlBlvzkvunocCMOgzDoyMeo2O unL59zZH9dd5Dk/0//dkgiSpVZ+f07kHlmdbG3oaofxex+5l3YrgzB1SpuKT3o8nJdY/ WFnw== 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=yWD9YrNTyyRNxL/jvzCdcI4G86YYPC0nobZQkHFIfzM=; fh=Pq7utEzs3KbaBDGtrjfUXzjEIBPT1l1o0fhVtCU5Oyc=; b=izaVkIUT/EuKPgpCprENBW+bzM7mRBc+tbjfP8koWm5qJ9WqUvtO11r7noTGuDNtpG nu5hu2pj1v64vPm+v7YAGg6eV5h/p5tiR42FStHcGL4vUgJh6JCxDkEtOyPkykyO1fn8 hKH3eS74xwzPRwWkB844+Xg6/WvFe8tUwV2nKEJuOOjn7lCIHmWoDSXyUjAf88QtdvqG 01Ws4ROd6yGWdchW5wx2ZJzgJhBnAPQp3k6GhVsW4ae2YAv4ZQAj3p27atAc8u+qhS/a rAKur87IfwvIwIQUobjaNcCGlSFrev+n7TllIPM4Pwx3BSd+sGDTN5PxbYoWYn0dXZI/ 2XHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YHVZmMob; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y71-20020a638a4a000000b005bdfd3a269fsi5155330pgd.581.2023.11.16.06.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 06:02:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YHVZmMob; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id A6DFB8213F02; Thu, 16 Nov 2023 06:02:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345300AbjKPOCF (ORCPT + 99 others); Thu, 16 Nov 2023 09:02:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345288AbjKPOCB (ORCPT ); Thu, 16 Nov 2023 09:02:01 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 946DA126; Thu, 16 Nov 2023 06:01:57 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6F20820004; Thu, 16 Nov 2023 14:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700143316; 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=yWD9YrNTyyRNxL/jvzCdcI4G86YYPC0nobZQkHFIfzM=; b=YHVZmMobVurUKpgivgCtynY3fdmpB4WSsy1ZPbV1dLDm4vuNoeoMyZLwKzUuxPWLKviXdI LqWiptoBqhYHSLfi0UQqpOJnfPRlMajUnWmDnsVvus2AUXAjVF16aLgA69EtFpbxeKQtHJ qrhpU74Peshn1wizHHVe0mKnq3BtjYUgTE4xtq4xQxKkMXT+CiDW3QhN4MU30od167Iy3n 3FhCoivbp0q0IXxR2JtPv8VKaySK7IoQBk8qDzycV+LUVM5cazWYseI+Bg8oDN1NsWvA0b ezkHGQFOxXEm8sDZzEcotThWz0BdvOexW3ze8l7cplNzk22BhhE+Xg1mZUKINA== From: Kory Maincent Date: Thu, 16 Nov 2023 15:01:33 +0100 Subject: [PATCH net-next 1/9] 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: <20231116-feature_poe-v1-1-be48044bf249@bootlin.com> References: <20231116-feature_poe-v1-0-be48044bf249@bootlin.com> In-Reply-To: <20231116-feature_poe-v1-0-be48044bf249@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 Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Kory Maincent X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 06:02:09 -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." 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