lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJq09z4dOF4_XzKFRSP_ABoqN8y8ZXD1kOgxuL7TvC=8_M9Ojw@mail.gmail.com>
Date: Sun, 28 Jan 2024 20:34:29 -0300
From: Luiz Angelo Daros de Luca <luizluca@...il.com>
To: Vladimir Oltean <olteanv@...il.com>
Cc: netdev@...r.kernel.org, linus.walleij@...aro.org, alsi@...g-olufsen.dk, 
	andrew@...n.ch, f.fainelli@...il.com, davem@...emloft.net, 
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	arinc.unal@...nc9.com, ansuelsmth@...il.com
Subject: Re: [PATCH net-next v4 03/11] net: dsa: realtek: convert variants
 into real drivers

> On Tue, Jan 23, 2024 at 06:55:55PM -0300, Luiz Angelo Daros de Luca wrote:
> > diff --git a/drivers/net/dsa/realtek/realtek-mdio.c b/drivers/net/dsa/realtek/realtek-mdio.c
> > index df214b2f60d1..22a63f41e3f2 100644
> > --- a/drivers/net/dsa/realtek/realtek-mdio.c
> > +++ b/drivers/net/dsa/realtek/realtek-mdio.c
> > @@ -249,8 +276,20 @@ static void realtek_mdio_remove(struct mdio_device *mdiodev)
> >       if (priv->reset)
> >               gpiod_set_value(priv->reset, 1);
> >  }
> > +EXPORT_SYMBOL_NS_GPL(realtek_mdio_remove, REALTEK_DSA);
> >
> > -static void realtek_mdio_shutdown(struct mdio_device *mdiodev)
> > +/**
> > + * realtek_mdio_shutdown() - Shutdown the driver of a MDIO-connected switch
> > + * @pdev: platform_device to probe on.
> > + *
> > + * This function should be used as the .shutdown in an mdio_driver. It shuts
> > + * down the DSA switch and cleans the platform driver data.
>
> , to prevent realtek_mdio_remove() from running afterwards, which is
> possible if the parent bus implements its own .shutdown() as .remove().

I didn't think that both could be called in sequence. I learned
something today. Thanks.

>
> > + *
> > + * Context: Any context.
> > + * Return: Nothing.
> > + *
> > + */
> > +void realtek_mdio_shutdown(struct mdio_device *mdiodev)
> >  {
> >       struct realtek_priv *priv = dev_get_drvdata(&mdiodev->dev);
> >
> > @@ -521,8 +548,20 @@ static void realtek_smi_remove(struct platform_device *pdev)
> >       if (priv->reset)
> >               gpiod_set_value(priv->reset, 1);
> >  }
> > +EXPORT_SYMBOL_NS_GPL(realtek_smi_remove, REALTEK_DSA);
> >
> > -static void realtek_smi_shutdown(struct platform_device *pdev)
> > +/**
> > + * realtek_smi_shutdown() - Shutdown the driver of a SMI-connected switch
> > + * @pdev: platform_device to probe on.
> > + *
> > + * This function should be used as the .shutdown in a platform_driver. It shuts
> > + * down the DSA switch and cleans the platform driver data.
>
> Likewise.
>
> > + *
> > + * Context: Any context.
> > + * Return: Nothing.
> > + *
>
> I'm not sure if the blank line at the end of the comment is necessary.

I'll remove them.

Regards,

Luiz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ