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: <20240125102525.5kowvatb6rvb72m5@skbuf>
Date: Thu, 25 Jan 2024 12:25:25 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Luiz Angelo Daros de Luca <luizluca@...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().

> + *
> + * 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.

> + */
> +void realtek_smi_shutdown(struct platform_device *pdev)
>  {
>  	struct realtek_priv *priv = platform_get_drvdata(pdev);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ