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  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:   Thu, 14 May 2020 03:31:03 +0200
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 V5 13/19] net: ks8851: Split out SPI specific code from
 probe() and remove()

On Thu, May 14, 2020 at 02:07:41AM +0200, Marek Vasut wrote:
> Factor out common code into ks8851_probe_common() and
> ks8851_remove_common() to permit both SPI and parallel
> bus driver variants to use the common code path for
> both probing and removal.
> 
> 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>
> ---
> V2: - Add RB from Andrew
>     - Rework on top of locking patches, drop RB
> V3: No change
> V4: No change
> V5: Pass message enable as parameter to common probe function,
>     so the MODULE_* bits can be per-driver
> ---
>  drivers/net/ethernet/micrel/ks8851.c | 86 ++++++++++++++++------------
>  1 file changed, 48 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
> index 440ddd5cafbd..791b2f14dd9d 100644
> --- a/drivers/net/ethernet/micrel/ks8851.c
> +++ b/drivers/net/ethernet/micrel/ks8851.c
> @@ -1431,27 +1431,15 @@ static int ks8851_resume(struct device *dev)
>  
>  static SIMPLE_DEV_PM_OPS(ks8851_pm_ops, ks8851_suspend, ks8851_resume);
>  
> -static int ks8851_probe(struct spi_device *spi)
> +static int ks8851_probe_common(struct net_device *netdev, struct device *dev,
> +			       int msg_en)
>  {

>  
> -	dev_info(dev, "message enable is %d\n", msg_enable);
> +	dev_info(dev, "message enable is %d\n", msg_en);
>  
>  	/* set the default message enable */
> -	ks->msg_enable = netif_msg_init(msg_enable, (NETIF_MSG_DRV |
> -						     NETIF_MSG_PROBE |
> -						     NETIF_MSG_LINK));
> +	ks->msg_enable = netif_msg_init(msg_en, NETIF_MSG_DRV |
> +						NETIF_MSG_PROBE |
> +						NETIF_MSG_LINK);

It would of been nice to keep the name msg_en, then these changes
would not be needed. Or is there something not visible in this patch
which means the variable name it not usable?

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists