From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 957E0C83F17 for ; Mon, 28 Jul 2025 16:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UHxdT55JRA7x7Guv/dUxLd0lwCXlgL3mLFhEqQaE6hM=; b=qmcT/3jZWvwTGCpSnRj3ScItxP 8jek7TKnLcoVrQOKi8zVLs4IwfJShhCBRk5i7IV+6L8f3ze66eRpaIc8Hm/KGrEQ0gXusdy1c/XRC Py06xpejIs7xR72ER7t/3ZIZgLEw/rYifhSNOdWUlddtnKdT8lymCek6qJxqcJVvmTOc1lIbQMBeP H/2ZLdYsGU5ibtPBQWbCUVwwrI4eb7ke5FXv2FbuXvallS06+sJ05wzpqRIMVwsJlGa3lI9o06bXN BkCCS7Dl1yMbY/OQVHdQ0l7N+fVfphQahA2A7yv3GFMywjaISmY1/guR7lcYhMuR9PoRbSWrHcZpB nJXHStDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugRBs-0000000F2zh-2jNa; Mon, 28 Jul 2025 16:59:08 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ugQ5P-0000000EsDW-078v for linux-arm-kernel@lists.infradead.org; Mon, 28 Jul 2025 15:48:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UHxdT55JRA7x7Guv/dUxLd0lwCXlgL3mLFhEqQaE6hM=; b=IxkRkgjE4yCWF2WhvrKlsr7Y4K T/1fAB26cA63Nn6qw1owOTIc/x+B5EtkroDZIfT9N7xi5eU6vW80B3Nxayzab8OXxHdqBe59Woaf1 MbLAEjWggFQxgoeRq+iGvWTEeMpheGRyJC8HCuUVnOcptWQpuGlJoZS06izNRax88aTEoepk16b8o WDeM5HUJ2vfAvC7ZmNYvlpXWh8JFVNKwtL5sEJhNZB6fKlkoFM91L3e1IpCIHnMqOasgcofMk8FLd /ArS1FnuIwJ+nvR22S8++HGcNyTBHJdbNP2n2Gt5c55UZ9hnTjf3/ArdCPXaoF1FfScggY/Hmmu58 FMQGXEiA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:55542 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ugQ3L-0000Tl-2a; Mon, 28 Jul 2025 16:46:15 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ugQ2e-006KCw-7V; Mon, 28 Jul 2025 16:45:32 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH RFC net-next 1/7] net: stmmac: remove unnecessary checks in ethtool eee ops MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Date: Mon, 28 Jul 2025 16:45:32 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250728_084823_057665_2AD7DE41 X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Phylink will check whether the MAC supports the LPI methods in struct phylink_mac_ops, and return -EOPNOTSUPP if the LPI capabilities are not provided. stmmac doesn't provide LPI capabilities if priv->dma_cap.eee is not set. Therefore, checking the state of priv->dma_cap.eee in the ethtool ops and returning -EOPNOTSUPP is redundant - let phylink handle this. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 77758a7299b4..dda7ba1f524d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -852,9 +852,6 @@ static int stmmac_ethtool_op_get_eee(struct net_device *dev, { struct stmmac_priv *priv = netdev_priv(dev); - if (!priv->dma_cap.eee) - return -EOPNOTSUPP; - return phylink_ethtool_get_eee(priv->phylink, edata); } @@ -863,9 +860,6 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev, { struct stmmac_priv *priv = netdev_priv(dev); - if (!priv->dma_cap.eee) - return -EOPNOTSUPP; - return phylink_ethtool_set_eee(priv->phylink, edata); } -- 2.30.2