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

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Wed Feb 14 2001 - 18:55:54 EST


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



This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:25 EST