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] [day] [month] [year] [list]
Date:	Wed, 28 Feb 2007 16:40:23 -0700
From:	"Dale Farnsworth" <dale@...nsworth.org>
To:	Stephen Hemminger <shemminger@...ux-foundation.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, Feb 28, 2007 at 03:11:03PM -0800, Stephen Hemminger wrote:
> 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

Thanks.  I follow up with a modified patch in a day or two.

-Dale
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ