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:   Sat, 26 Oct 2019 15:24:46 -0700
From:   Joe Perches <joe@...ches.com>
To:     Linus Walleij <linus.walleij@...aro.org>, netdev@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>
Cc:     Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 07/10] net: ehernet: ixp4xx: Use devm_alloc_etherdev()

On Mon, 2019-10-21 at 02:08 +0200, Linus Walleij wrote:
> Using the devm_alloc_etherdev() function simplifies the error
> path. I also patch the message to use dev_info().

slight typo in subject

> diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c

Maybe it's better to avoid changing this driver.
Is this device still sold?  It's 15+ years old.

> @@ -1378,7 +1378,7 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
>  
>  	plat = dev_get_platdata(dev);
>  
> -	if (!(ndev = alloc_etherdev(sizeof(struct port))))
> +	if (!(ndev = devm_alloc_etherdev(dev, sizeof(struct port))))

Probably nicer to split the assignment and test too.

> @@ -1479,8 +1476,8 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
>  	if ((err = register_netdev(ndev)))
>  		goto err_phy_dis;
>  
> -	printk(KERN_INFO "%s: MII PHY %i on %s\n", ndev->name, plat->phy,
> -	       npe_name(port->npe));
> +	dev_info(dev, "%s: MII PHY %i on %s\n", ndev->name, plat->phy,
> +		 npe_name(port->npe));

and this should probably be

	netdev_info(ndev, "MII PHY %d on %s\n", plat->phy, npe_name(port->npe));

But there are 30+ printks in this file, so why just this one?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ