From patchwork Tue Feb 27 14:42:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?K=C3=B6ry_Maincent?= X-Patchwork-Id: 207248 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2742365dyb; Tue, 27 Feb 2024 06:47:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW+uV9M6ZWL9kC4kLCNSyhV07zB/D7x/8jN8oLaEtPTNyCkvQi6QezXZCFMvnrRYNi590fiU9hkXAC7qh8kRxfIXbgtzg== X-Google-Smtp-Source: AGHT+IFPAJ8nzFZuUgAuei98cKJCliQ6/CNhMH9o23P9eq4oB36QxSByzu/HO0EN+1E5eEyusOYl X-Received: by 2002:a05:6a20:762a:b0:1a0:d25b:aaac with SMTP id m42-20020a056a20762a00b001a0d25baaacmr1536716pze.32.1709045224983; Tue, 27 Feb 2024 06:47:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709045224; cv=pass; d=google.com; s=arc-20160816; b=kNiUqg3Bnf0dBhstIcbUt4a9BcNoeolSD381dtv32Vn7tkNN20XFNqOecswcwU0aFj y5fMOMAKMweSllcPJM+Q0UDobPrWFqBJjfzibXJ1F+K4fKgC5vijArN+ElH5D3+LdI8l pgKEcCcuHH2tB9m7TRKrwCUZ3/EL2oCL0NPVEj5hobqwmreadYH0dIqIH7gf4uLdpmuD uenuDrvh5xwc8iwgzCOQmw4Mgd8f15i+w/d4ECkcEFxWlB5VNFcsSJVmjmsKGt4YWRct hLZSTxHEt5p+twytYhVZWXtJNUvt2C/guaA13xqHwiv3+ZYzj46jnIoZ2jz4uDYMH9d7 5IOg== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83416-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r33-20020a63fc61000000b005dc42dccf38si5486084pgk.279.2024.02.27.06.47.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 06:47:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83416-ouuuleilei=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=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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83416-ouuuleilei=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 42B2728668B for ; Tue, 27 Feb 2024 14:46:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDD1F14DFFD; Tue, 27 Feb 2024 14:43:24 +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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792063805616289717 X-GMAIL-MSGID: 1792063805616289717 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) {