From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 291CD15B0EC for ; Sat, 31 Jan 2026 23:28:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769902092; cv=none; b=c6Zybbim4ZJJRsfy+1x3tYAuvPwvzlW+/kqLegr0lvpKdRjk17cc2V2kIwYYOlZir8nbALNKDx6QqafgvjkojJyzPzSewYxIAI/u66qUssHIRCv/pD+xHEUopUXoXJPvFGIaPQNtl9eICAhDGnByisqAxRPbFw994A/oVgF4e5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769902092; c=relaxed/simple; bh=SVnsVFIjjrl1ziY7Q9Q5pBmlCfdAoPDhVQM6QIxWBVA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sMOmFBduBzpPK3DBIA/65Hggv3pbq2ZxzRKgpiN5AWPa+raFvXvZdxp8d5gi8CRFg4T3AlpUk3TMKuPlwtccTDyxxoArw16Z/PTDvOxluKkk0MqrYHAaUR8fgPhvOfiG0Cv88MobMZ3E6d0kLYGdH/BOkcLxqXhXGjsQ9Ox6uUY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=SnP/VPBu; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="SnP/VPBu" 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=kIes9y28tS53Qgsq8mlA/hmeh5zQSe+vuQTcGCaQLH4=; b=SnP/VPBuH22KxGVfdB2UJKAixc XVM2hHoezwF+JSBRIjcXee6VRY+f2A2Dt8SxHuoKhtphXFXjaLuHEqKGOmAlW/LGPuas7yAWsp0Jv +q112L2P5WjDSye8Mkp2L6t+G6inKJkalVVwZ74B6RKQkUb5AvfLngK0Ml7yFtERFVPgNhxWIKQdy Bn6PBryzaRjkQ+NZDn0lTUQTo/xfRl5SUmchU/R2jQqCdkRGsuOCXhSNKhJu432u4NrePBebZNL2k qd8fHOJ6Bl025nTCABmPilcoTvfFB1h3eR/tOP1xHq14+tUNIiMBeNtu2p9w4c7cQpMxrL4yMMsel rfFTFUlQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55010) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vmKNe-000000002aH-2I5S; Sat, 31 Jan 2026 23:27:54 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vmKNY-000000001sG-1Jn3; Sat, 31 Jan 2026 23:27:48 +0000 Date: Sat, 31 Jan 2026 23:27:48 +0000 From: "Russell King (Oracle)" To: Jakub Kicinski Cc: Andrew Lunn , Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Heiko Stuebner , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, Paolo Abeni Subject: Re: [PATCH net-next 01/10] net: stmmac: rk: convert to mask-based interface mode configuration Message-ID: References: <20260131140850.3c35f95a@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260131140850.3c35f95a@kernel.org> Sender: Russell King (Oracle) On Sat, Jan 31, 2026 at 02:08:50PM -0800, Jakub Kicinski wrote: > On Fri, 30 Jan 2026 11:00:14 +0000 Russell King (Oracle) wrote: > > + ret = rk_get_phy_intf_sel(bsp_priv->phy_iface); > > + if (ret < 0) > > + return ret; > > + > > + intf = ret; > > + > > ret = gmac_clk_enable(bsp_priv, true); > > if (ret) > > return ret; > > > > + if (bsp_priv->gmac_phy_intf_sel_mask || > > + bsp_priv->gmac_rmii_mode_mask) { > > + /* If defined, encode the phy_intf_sel value */ > > + val = rk_encode_wm16(intf, bsp_priv->gmac_phy_intf_sel_mask); > > + > > + /* If defined, encode the RMII mode mask setting. */ > > + val |= rk_encode_wm16(intf == PHY_INTF_SEL_RMII, > > + bsp_priv->gmac_rmii_mode_mask); > > + > > + ret = regmap_write(bsp_priv->grf, bsp_priv->gmac_grf_reg, val); > > + if (ret < 0) > > missing > gmac_clk_enable(bsp_priv, false); > here? Opinions vary on whether errors from regmap_write() should be handled. See the recent thread: https://lore.kernel.org/r/aXh9lcfw6D6KouI_@stanley.mountain Seems that if regmap_write() fails, it's "buy a new computer" realms. If that's case, is it worth cleaning up resources, or even checking the return code from regmap_write() ? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!