Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp553864rdb; Thu, 15 Feb 2024 08:07:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUIjec+IBvzy/q11bDH6J2+tMG8wrRMzC8N71TpHflFNC3b6sOzlTa5wZvebfFkhhBP3gHS/TuR/AV1FtEjWijphLtMqu6eYieGaxzO/g== X-Google-Smtp-Source: AGHT+IHWlfx4TM6F6vnVL0RDgUvYpWEknZwSrVlHNeG70bhNoPg6U/kP7jwT3KYDRAEQuvbxGbkS X-Received: by 2002:a17:902:cec2:b0:1d8:ab27:d76c with SMTP id d2-20020a170902cec200b001d8ab27d76cmr2841249plg.51.1708013241018; Thu, 15 Feb 2024 08:07:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708013240; cv=pass; d=google.com; s=arc-20160816; b=EhJLe5jk7N0KewAY8f9DfrhqobNHGPdT1hyETSa/idFh43o+h5Oj7ZsV1BM61QfgF/ z7mPwdyrfjcbnjiD2n4iFy/l/aU53pvwd78i64ARznxCQ8QB4sBi4lqE68G8p7Jq5Okw XwKeVDwyNGqw9novXQH+cRlTBRhCyQw9+yWA+QP38LJzC1QIhpiOG9cRALtRTHvOZrww 5Y3ISD3ja10f5GaVudXV5cNJpRZUCK5n/QGOO1c2NJBG2C9F9rVMDEv+CSzvAsCZXXj7 5ajI2WD7smqQYUUrccBqWsVstFr99dh6XDLl/Q84fJ6CTFO25V1RDq/r79kcMrQbW0aH UT9Q== 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=iiVtu1kQu+NyJjM81tkCaAkmDmF8klOKbuqjZE3Xyf6h75ZrFzMDhVyAWghMsjgxBV W5aT2K0XCUvhvS1RzPq/mXlKpx1sAHib3/ITzvDZiMWZJJ/5Wlm1L6PA+tdrYLEZr5oJ vAUrfotw93BxKHZGJCs1wrZmzoIu6/LnZRdGplnIuGAgEI8j1yBxwnmReCwrvipFjvH8 fZijF1J7Yzlx9c3n2h1dFjG5Pg4qr55sTsmKMjdh5JcRGhZ3ssF2jFKS6kKsebDarK43 OTuSUBZrSIry/g671JscxizMF8KUiJ/R6mXTO3VoFFUmP0WcuIt2f3jS3KMFbrWGd7R8 sqxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jPlnZsx7; 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-67263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67263-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c20-20020a170902b69400b001db47573c41si1340793pls.57.2024.02.15.08.07.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:07:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=jPlnZsx7; 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-67263-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67263-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 D211328E17F for ; Thu, 15 Feb 2024 16:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FDDB13667F; Thu, 15 Feb 2024 16:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jPlnZsx7" 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 1B5A0133994; Thu, 15 Feb 2024 16:03:26 +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=1708013009; cv=none; b=T1JMT7VF6FjxYTqWlRPDh80FO/tqLzIy6dHNcLD67/YMXf+zFaSHbvNqiP41ihX/N56be72dvjk/13b97yQfpTtEY+i4mxnyA7vrOrgXdS6zgzfviUKpVZZu3BMfhrjFjqWLT7j4lCWEdZxIQCjSsvTWcnNKesJ2q4FIaiPxqKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708013009; c=relaxed/simple; bh=VpiQZLRng134HOd+u7eImqm51VyTR3E0Jy/qPzO0dfo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d4Pd2iioLtjvNBEVsJnT0W+RdzRyYLya0MA4Hne4tPjLbS7FpX8e8T4hnu3keoLS6Ru53xZvW7m2RX7vwekoGeCJUHtKnhAQtv0/962kZZr/oMtgTZr65eI8eJnLvUgquIIgt+If/QXei0Oe9j3fvwzP+3IhzQE4d3WX8zvBxqI= 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=jPlnZsx7; 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 E829320007; Thu, 15 Feb 2024 16:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708013005; 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=jPlnZsx7epCGdRUfvHEg07b1XREsvyXLD+bppUiO2auUdHwHlif5V00aTBZ+5p3b1GQvsR 3zIfJDUMIYnofNE4R160c9PUjPTXszxi0GtTw2yN9N88PreEqkc+VKXY6RaZS3G3Zk566o alT9oeh4HmwB/Fl8zK4MkBqWArRaXOOT8oawW94/dqYhhKGAW0bpLRvt1IgIRoR+3J7Y/+ Zc1fbO9L+7tDPmMUuMAFi70LezB5As+pBc+1HknppYe83l0q7BlTLEKDalH2MsqVV1CHx4 wwuXRtWyIH2P3cu6eUpPLujcqtHqjvH9HzvbSBmy5Jx8W/PcA8lo39v7Q9I0NQ== From: Kory Maincent Date: Thu, 15 Feb 2024 17:02:44 +0100 Subject: [PATCH net-next v4 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: <20240215-feature_poe-v4-3-35bb4c23266c@bootlin.com> References: <20240215-feature_poe-v4-0-35bb4c23266c@bootlin.com> In-Reply-To: <20240215-feature_poe-v4-0-35bb4c23266c@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