Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1963245rbb; Tue, 27 Feb 2024 06:46:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXnNI1PQJKar8+9X90ynXgVeHFE/CD//ET2LYD0sVj4FCemhSmQNptzf0fzVNb7bL90wqaqOEemng+5cJ6F3FiPcOPlT6SFBxW99fOS/Q== X-Google-Smtp-Source: AGHT+IFjVUol3yAh9CTNr0a/KvsYCUkLqcQV/Gz45eY9FMom4h6CBSMAWGsID+U8nfICzcCjpMH5 X-Received: by 2002:a17:902:cf0d:b0:1dc:b3a3:ca73 with SMTP id i13-20020a170902cf0d00b001dcb3a3ca73mr4117599plg.38.1709045188146; Tue, 27 Feb 2024 06:46:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709045188; cv=pass; d=google.com; s=arc-20160816; b=ntPiCYqvXb+foKFA598TAuLv8PaQKdK2LYr5l2rZWMkBHzMthjrTkx3yp6k1qe1hcN c4qLOuGTYtI0a8t/9SjblNVzEV5OQpLiuBf/x+ki0htazyzfRHrWRlVHxtI9ai+xAB8X EM83b1poJBto15eUKM3CCYsSO64a7H19N2AyAlZuS+DyLZerD3C6Xm/d780an/DLOeZ8 LTmiFw5ty8XSt25Yw9QYELMVmEEgqNQwAk1iHrJUXfuuLtTurG6NnCjLTYuNSoX/pJun tbLvJat0WfCsZf0BmHhlE1J1gRqsUHa+D5fCJOzJb5YWXSib2pzNpX8DB8bV74LiVWlz nRLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=UJPO+/nnaxU0Id9ikRVBjeMR47kJHD/icAL+yePRrNQ=; fh=7S+YztZcCxZKIOm2mMOwIzm96FjMcKQ7LjGMKaNLlnQ=; b=s1Ep2Cvxkx01sYodgzRYWqG7Wjjb7xwORGHnrCm9KjemEMuX15Sz82sKJfM0UbabDH cAyyexbGm9dxRRYXOxeXN3MosdWvPPAZ+S/OC/hBdj5rsStZvrMadqCR6EL09u6gKWTw CmCXRi4RFaZ7U4MOhl/ozMbp0FwkUYJrb+q9aWCO0qiYeh4crxhDcZ8tiEd4owaqpY0G AZstNL0Fwg227up1/4m4jOuilHiex2SDKdsvqKBIkokPoZUSMH7DmhKsK3kViQ4j7Dwj uXTPr3zmbUfvOxfO+FonmgKl5weL/5lYpy7B4UXpckm9qoXzDjPTWivKNSGv+PtWDLZL U8RA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SbFiWGJe; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-83416-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83416-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x4-20020a170902ec8400b001d9e1ab2acbsi1554332plg.356.2024.02.27.06.46.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 06:46:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83416-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SbFiWGJe; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-83416-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83416-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C0CEA28C784 for ; Tue, 27 Feb 2024 14:45:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B82914A08A; Tue, 27 Feb 2024 14:43:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SbFiWGJe" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61FC413B2B3; Tue, 27 Feb 2024 14:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709044999; cv=none; b=azVJHIgqxEm4XbKyOrXL1ODqa238A2w4fCVYBoSwhwVIr70wEUm/XZqlg48WJfeH2HeEJhUvVKUIfqXsmcfcWOhI4T46CXYppF8jUNoGMGlsQdfMpIbjT1edZxxgeyROORizhrAvrnkmEQvxfWL0JsCyA26rzWJN1TKQPBA18iI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709044999; c=relaxed/simple; bh=VpiQZLRng134HOd+u7eImqm51VyTR3E0Jy/qPzO0dfo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fKQDYltGPCmE1XKltSnpMVL55cLP+S8RYNHZgKt4AU/6sarfa4MFeVzdoLvRSnMa9gqb8HwHvCsPRgoBWI+xw88IxFv8q+atThmOaATZpD1KfYp22p41Ag0dicsKJpm0JCouNgHlrjC8mXOPELKH1h9jV27kQBDTfOvaJUC+n6g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=SbFiWGJe; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 7251C2000F; Tue, 27 Feb 2024 14:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709044989; 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=UJPO+/nnaxU0Id9ikRVBjeMR47kJHD/icAL+yePRrNQ=; b=SbFiWGJeTtBAz7/TWoNqTzQpxJ0zldiBaCCsABckOYw91CL/QyWSD8sPkcTfYH1/q/EfvD v6TiCV9uT62+6807fSqELe5mFbIWvyBkfV0uRSbVfv2nd8a3jyh2lvwnRZ6dgAXwTbdglf L7byjmYct7SsCKi72WuerEiikyB2iY2j2m6sOCAsUa1SWsAn6/zZNIZZWGz2rqR1RboK73 Qe3QGQv4VQV5BCxaSiQ0G4PmfEKK9UqowN47o6ZyZyxO/IAel3wpWXNMSYfMDxdDsrKisp FzoUSpBNZLKNqcGBwyaBeX/GRsenKXEySV20jJMvNQPBvxA14M3GDY52vrMZ5w== From: Kory Maincent Date: Tue, 27 Feb 2024 15:42:45 +0100 Subject: [PATCH net-next v5 03/17] net: pse-pd: Rectify and adapt the naming of admin_cotrol member of struct pse_control_config Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240227-feature_poe-v5-3-28f0aa48246d@bootlin.com> References: <20240227-feature_poe-v5-0-28f0aa48246d@bootlin.com> In-Reply-To: <20240227-feature_poe-v5-0-28f0aa48246d@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 , Mark Brown , Frank Rowand , Andrew Lunn , Heiner Kallweit , Russell King 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 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." This patch is sponsored by Dent Project . Reviewed-by: Oleksij Rempel Reviewed-by: Andrew Lunn 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