Subject: Re: [PATCH 01/14] net: ks8851: Factor out spi->dev in probe()/remove()

From: Andrew Lunn <[email-masked]>
Date: Tue, 24 Mar 2020 02:15:37 +0100

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 <[email-masked]>
> Cc: David S. Miller <[email-masked]>
> Cc: Lukas Wunner <[email-masked]>
> Cc: Petr Stetiar <[email-masked]>
> Cc: YueHaibing <[email-masked]>
> ---
>  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