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 0DC14C4828F for ; Sun, 4 Feb 2024 12:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zLoepyCQ+Pmr4RemD9H5hUcVB0WE49LAeTJiQPBc3oY=; b=fSU/vaA1KAAqWu GEsbVKFYlaA5H8bC2YPQ1PAELLKiwcjDEmzIefMkXR5W04IUERQGXrgZ1sMyu+tVYV8k3Ovg4Aw35 lT/tnqlHZPHqkxHRi9UAqHZ719p3rEp9BBoUlHmUWeKRE9LrFtIpH4cKtiFneYWbX5ILVBWm1Jz0I Ht0ZnDGzVm0A5xYbSRp43sbbjHeLi5QYvMWAr4/RCsK9PW3NYvfUXnF7N5e1WvhRXk1z565fihSjY xvYrqUkvXGx5VgCeHoyYdp0EiCdQsTiEjtFj2edLpEZvJdJZkmUjkIvVOWm+7noyqr7R3Lkol7mZM ++mfIEBysYW460TENZow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWbD2-00000000huI-3Ixk; Sun, 04 Feb 2024 12:02:52 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWbD0-00000000htD-0tYp for linux-arm-kernel@lists.infradead.org; Sun, 04 Feb 2024 12:02:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=AD+IVUHMa3dw9w4MF7Be3IiiFcnBNwHoY6xljGZOJKM=; b=zThtl2JYDIKy1ZxaplyiFGGYjx AVdesRkik9VBjoUP+J2Yofbu1kkroUFDrPwPFrvSeDM0L735yGGANTBuDyQF+X0Q0JCkyCM9Q3Bit y6s9IvCbe7X7RYSeYbyGi1KUk20OOEQN8SRdFEyRcgOwvSjce/n7AMMGDWs7zMcU63hRbFJTMb7Ye Da4eHsYX0gnUwC0l1EIkrWY2DNdSlbFIFjIO8dw7B7T2Nf7+yiKNWd/POk51sPN8jd/aBmR19oyip dUsNfkN4r/QB+7BCTgIsvJoZqET/CyGOVQkh7gPmiwULqUqh18Afcd5OpI5q1TjMJNcRtS3SFS+FS mlzTzAsA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33984) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rWbCk-0007uZ-2d; Sun, 04 Feb 2024 12:02:34 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rWbCe-0001jb-Kc; Sun, 04 Feb 2024 12:02:28 +0000 Date: Sun, 4 Feb 2024 12:02:28 +0000 From: "Russell King (Oracle)" To: Florian Fainelli Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , bcm-kernel-feedback-list@broadcom.com, Byungho An , Clark Wang , "David S. Miller" , Doug Berger , Eric Dumazet , Jakub Kicinski , Jose Abreu , Justin Chen , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, NXP Linux Team , Paolo Abeni , Shenwei Wang , Vladimir Oltean , Wei Fang Subject: Re: [PATCH net-next 4/6] net: bcmgenet: remove eee_enabled/eee_active in bcmgenet_get_eee() Message-ID: References: <4586d004-a7b7-4e60-9493-0a1bbe7d79ba@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4586d004-a7b7-4e60-9493-0a1bbe7d79ba@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240204_040250_282394_1AA4DE14 X-CRM114-Status: GOOD ( 15.27 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 02, 2024 at 05:21:57PM -0800, Florian Fainelli wrote: > > > On 2/2/2024 5:17 PM, Florian Fainelli wrote: > > > > > > On 2/2/2024 1:34 AM, Russell King (Oracle) wrote: > > > bcmgenet_get_eee() sets edata->eee_active and edata->eee_enabled from > > > its own copy, and then calls phy_ethtool_get_eee() which in turn will > > > call genphy_c45_ethtool_get_eee(). > > > > > > genphy_c45_ethtool_get_eee() will overwrite eee_enabled and eee_active > > > with its own interpretation from the PHYs settings and negotiation > > > result. > > > > > > Therefore, setting these members in bcmgenet_get_eee() is redundant, > > > and can be removed. This also makes priv->eee.eee_active unnecessary, > > > so remove this and use a local variable where appropriate. > > > > > > Signed-off-by: Russell King (Oracle) > > > > Reviewed-by: Florian Fainelli > > > > Is not there an opportunity for no longer overriding eee_enabled as well > > since genphy_c45_ethtool_get_eee() will set that variable too? > > Scratch that comment, you are doing it in the getter. Also, priv->eee.eee_enabled is used in bcmmii.c, so we can't get rid of it in the setter. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel