Re: [PATCH net-next v2 13/14] net: dsa: mt7530: introduce driver for MT7988 built-in switch

From: Daniel Golle
Date: Tue Apr 25 2023 - 12:13:36 EST


On Tue, Apr 25, 2023 at 05:51:37PM +0200, Philipp Zabel wrote:
> Hi Daniel,
>
> On Mon, Apr 03, 2023 at 02:19:40AM +0100, Daniel Golle wrote:
> > Add driver for the built-in Gigabit Ethernet switch which can be found
> > in the MediaTek MT7988 SoC.
> >
> > The switch shares most of its design with MT7530 and MT7531, but has
> > it's registers mapped into the SoCs register space rather than being
> > connected externally or internally via MDIO.
> >
> > Introduce a new platform driver to support that.
> >
> > Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> > Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
> > ---
> > MAINTAINERS | 2 +
> > drivers/net/dsa/Kconfig | 12 +++
> > drivers/net/dsa/Makefile | 1 +
> > drivers/net/dsa/mt7530-mmio.c | 101 +++++++++++++++++++++++++
> [...]
> > diff --git a/drivers/net/dsa/mt7530-mmio.c b/drivers/net/dsa/mt7530-mmio.c
> > new file mode 100644
> > index 0000000000000..1a3d4b692f349
> > --- /dev/null
> > +++ b/drivers/net/dsa/mt7530-mmio.c
> > @@ -0,0 +1,101 @@
> [...]
> > + priv->rstc = devm_reset_control_get(&pdev->dev, NULL);
>
> Please use devm_reset_control_get_exclusive() directly.
>
> > + if (IS_ERR(priv->rstc)) {
> > + dev_err(&pdev->dev, "Couldn't get our reset line\n");
> > + return PTR_ERR(priv->rstc);
>
> Not sure if this can actually happen, but there is no need to warn on
> -EPROBE_DEFER. You could use return dev_err_probe(...) here.

Thank you for your comments. The series has already been picked to
net-next. Unless you want to send the suggested changes yourself, I will
prepare another series with your suggestions, and also apply them to
mt7530-mdio.c.