From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23CCA91 for ; Mon, 27 Nov 2023 05:25:43 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r7bbw-0001DE-Lv; Mon, 27 Nov 2023 14:25:16 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7bbt-00BxGz-0Y; Mon, 27 Nov 2023 14:25:13 +0100 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1r7bbs-000D9T-2y; Mon, 27 Nov 2023 14:25:12 +0100 Message-ID: <117dc1503ecd07448cc2e0b036b34a49f5e8c38e.camel@pengutronix.de> Subject: Re: [RFC PATCH 6/8] net: pcs: add driver for MediaTek USXGMII PCS From: Philipp Zabel To: Daniel Golle , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Lunn , Heiner Kallweit , Russell King , Alexander Couzens , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org Date: Mon, 27 Nov 2023 14:25:12 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org On Do, 2023-11-09 at 21:51 +0000, Daniel Golle wrote: > Add driver for USXGMII PCS found in the MediaTek MT7988 SoC and supportin= g > USXGMII, 10GBase-R and 5GBase-R interface modes. In order to support > Cisco SGMII, 1000Base-X and 2500Base-X via the also present LynxI PCS > create a wrapped PCS taking care of the components shared between the > new USXGMII PCS and the legacy LynxI PCS. >=20 > Signed-off-by: Daniel Golle > --- [...] > diff --git a/drivers/net/pcs/pcs-mtk-usxgmii.c b/drivers/net/pcs/pcs-mtk-= usxgmii.c > new file mode 100644 > index 0000000000000..b3ca66c9df2a9 > --- /dev/null > +++ b/drivers/net/pcs/pcs-mtk-usxgmii.c > @@ -0,0 +1,688 @@ [...] > +static int mtk_sgmii_wrapper_init(struct mtk_usxgmii_pcs *mpcs) > +{ > + struct device_node *r =3D mpcs->dev->of_node, *np; [...] > + rstc =3D of_reset_control_get_shared(r, "sgmii"); > + Superfluous whitespace. > + if (IS_ERR(rstc)) > + return PTR_ERR(rstc); Here you correctly check rstc for errors ... [...] > + wp->reset =3D rstc; [...] > + > + if (IS_ERR(wp->reset)) > + return PTR_ERR(wp->reset); And here you check it again. The second check can be dropped. regards Philipp