lkml.org 
[lkml]   [2001]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] pcnet32.c: MAC address may be in CSR registers
Date
From
> +int is_valid_ether_addr( char* address )
> +{
> + int i,isvalid=0;
> + for( i=0; i<6; i++)
> + isvalid |= address[i];
> + return isvalid && !(address[0]&1);
> +}

static and why not

static inline int is_valid_ea(u8 *addr)
{
return memcmp(addr, "\000\000\000\000\000\000", 6) && !(addr[0]&1);
}

That all assembles to nice inline code 8)

Looks ok to me, Im picking holes now

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

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.087 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site