lkml.org 
[lkml]   [2023]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [RFC PATCH 6/8] net: pcs: add driver for MediaTek USXGMII PCS
    From
    Date
    On Do, 2023-11-09 at 21:51 +0000, Daniel Golle wrote:
    > Add driver for USXGMII PCS found in the MediaTek MT7988 SoC and supporting
    > 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.
    >
    > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
    > ---
    [...]
    > 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 = mpcs->dev->of_node, *np;
    [...]
    > + rstc = 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 = 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

    \
     
     \ /
      Last update: 2023-11-27 14:33    [W:3.247 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site