Re: [PATCH] pcnet32.c: MAC address may be in CSR registers

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 14 Feb 2001 23:55:54 +0000 (GMT)


> +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/