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]
Date:   Tue, 24 Mar 2020 02:15:37 +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 01/14] net: ks8851: Factor out spi->dev in
 probe()/remove()

On Tue, Mar 24, 2020 at 12:42:50AM +0100, Marek Vasut wrote:
> Pull out the spi->dev into one common place in the function instead of
> having it repeated over and over again. This is done in preparation for
> unifying ks8851 and ks8851-mll drivers. 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 | 26 ++++++++++++++------------
>  1 file changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
> index 33305c9c5a62..d1e0116c9728 100644
> --- a/drivers/net/ethernet/micrel/ks8851.c
> +++ b/drivers/net/ethernet/micrel/ks8851.c
> @@ -1413,6 +1413,7 @@ static SIMPLE_DEV_PM_OPS(ks8851_pm_ops, ks8851_suspend, ks8851_resume);
>  
>  static int ks8851_probe(struct spi_device *spi)
>  {
> +	struct device *dev = &spi->dev;
>  	struct net_device *ndev;
>  	struct ks8851_net *ks;
>  	int ret;

Hi Marek

The naming in probe appears to be different to the rest of the
driver. Normally dev is a strict net_device. Here it is a struct
device and ndev is a net_device. Sometimes netdev is also used.

It might be a bigger change than what you want to do, but it would be
nice if it was consistent everywhere.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ