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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200324012249.GL3819@lunn.ch>
Date:   Tue, 24 Mar 2020 02:22:49 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Marek Vasut <marex@...x.de>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Lukas Wunner <lukas@...ner.de>, Petr Stetiar <ynezz@...e.cz>,
        YueHaibing <yuehaibing@...wei.com>
Subject: Re: [PATCH 05/14] net: ks8851: Use dev_{get,set}_drvdata()

On Tue, Mar 24, 2020 at 12:42:54AM +0100, Marek Vasut wrote:
> Replace spi_{get,set}_drvdata() with dev_{get,set}_drvdata(), which
> works for both SPI and platform drivers. This is done in preparation
> for unifying the KS8851 SPI and parallel bus drivers.
> 
> There should be no functional change.
> 
> Signed-off-by: Marek Vasut <marex@...x.de>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Lukas Wunner <lukas@...ner.de>
> Cc: Petr Stetiar <ynezz@...e.cz>
> Cc: YueHaibing <yuehaibing@...wei.com>
> ---
>  drivers/net/ethernet/micrel/ks8851.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
> index cc1137be3d8f..1c0a0364b047 100644
> --- a/drivers/net/ethernet/micrel/ks8851.c
> +++ b/drivers/net/ethernet/micrel/ks8851.c
> @@ -1521,7 +1521,7 @@ static int ks8851_probe(struct spi_device *spi)
>  	ndev->ethtool_ops = &ks8851_ethtool_ops;
>  	SET_NETDEV_DEV(ndev, dev);
>  
> -	spi_set_drvdata(spi, ks);
> +	dev_set_drvdata(dev, ks);
>  
>  	netif_carrier_off(ks->netdev);
>  	ndev->if_port = IF_PORT_100BASET;
> @@ -1570,8 +1570,8 @@ static int ks8851_probe(struct spi_device *spi)
>  
>  static int ks8851_remove(struct spi_device *spi)
>  {
> -	struct ks8851_net *priv = spi_get_drvdata(spi);
>  	struct device *dev = &spi->dev;
> +	struct ks8851_net *priv = dev_get_drvdata(dev);

Reverse Christmas tree. You need to split this.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ