Subject: Re: dm9000: add set_mac_address() v2

From: Michael Buesch <[email-masked]>
Date: Mon, 13 Aug 2007 00:58:59 +0200

On Monday 13 August 2007 00:45:17 Michael Trimarchi wrote:
> 
> >> +		return -EBUSY;
> >> +
> >> +	memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
> >> +
> >> +	for (i = 0; i < 3; i++)
> >> +		write_srom_word(db, i,
> >> +				cpu_to_le16(((u16 *) (addr->sa_data))[i]));
> >>     
> >
> > Nope.
> >
> > write_srom_word(db, i, le16_to_cpu(((__le16 *) (addr->sa_data))[i]));
> >
> >   
> Are you sure?

Yes I am. cpu_to_le16 simply doesn't make any sense at all here,
while le16_to_cpu does make sense and is indeed correct.
Though they both generate the same asm code. Running sparse
also tells you more about this. ;)

-- 
Greetings Michael.