[U-Boot] [PATCH] davinci: cleanup davinci_sync_env_enetaddr() fucntion

Mike Frysinger vapier at gentoo.org
Mon Feb 6 20:24:26 CET 2012


On Monday 06 February 2012 04:59:53 Manjunath Hadli wrote:
> --- a/arch/arm/cpu/arm926ejs/davinci/misc.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/misc.c
>
> +	ret = eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr);
> +	if (ret && !memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) {

i don't think the memcmp() is necessary.  the core code already calls 
is_valid_ether_addr() and one of the checks in there is for all zeros.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120206/5685e7d0/attachment.pgp>


More information about the U-Boot mailing list