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:	Wed, 28 Feb 2007 15:11:03 -0800
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	"Dale Farnsworth" <dale@...nsworth.org>
Cc:	Jeff Garzik <jgarzik@...ox.com>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, linux-mips@...ux-mips.org,
	Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH 1/2] mv643xx_eth: move mac_addr inside of
 mv643xx_eth_platform_data

On Wed, 28 Feb 2007 15:40:31 -0700
"Dale Farnsworth" <dale@...nsworth.org> wrote:

> The information contained within platform_data should be self-contained.
> Replace the pointer to a MAC address with the actual MAC address in
> struct mv643xx_eth_platform_data.
> 
> Signed-off-by: Dale Farnsworth <dale@...nsworth.org>
> 
> Index: b/drivers/net/mv643xx_eth.c
> ===================================================================
> --- a/drivers/net/mv643xx_eth.c
> +++ b/drivers/net/mv643xx_eth.c
> @@ -1380,7 +1380,9 @@ static int mv643xx_eth_probe(struct plat
>  
>  	pd = pdev->dev.platform_data;
>  	if (pd) {
> -		if (pd->mac_addr)
> +		static u8 zero_mac_addr[6] = { 0 };
> +
> +		if (memcmp(pd->mac_addr, zero_mac_addr, 6) != 0)
>  			memcpy(dev->dev_addr, pd->mac_addr, 6);


is_zero_ether_addr() is faster/cleaner for this

-- 
Stephen Hemminger <shemminger@...ux-foundation.org>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists