From: Michael Buesch <mb@bu3sch.de>
To: Michael Trimarchi <trimarchi@gandalf.sssup.it>
Cc: jgarzik@pobox.com, netdev@vger.kernel.org
Subject: Re: dm9000: add set_mac_address() v2
Date: Mon, 13 Aug 2007 00:58:59 +0200 [thread overview]
Message-ID: <200708130059.00117.mb@bu3sch.de> (raw)
In-Reply-To: <46BF8D7D.5070105@gandalf.sssup.it>
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.
next prev parent reply other threads:[~2007-08-12 22:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 19:27 dm9000: add set_mac_address() Michael Trimarchi
2007-08-12 21:38 ` Michael Buesch
2007-08-12 21:20 ` dm9000: add set_mac_address() v2 michael trimarchi
2007-08-12 22:26 ` Michael Buesch
2007-08-12 22:45 ` Michael Trimarchi
2007-08-12 22:58 ` Michael Buesch [this message]
2007-08-12 21:45 ` dm9000: add set_mac_address() Michael Buesch
2007-08-12 20:54 ` michael trimarchi
2007-08-12 23:08 ` Jeff Garzik
2007-08-13 7:24 ` Michael Trimarchi
2007-08-14 10:10 ` Ben Dooks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708130059.00117.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=trimarchi@gandalf.sssup.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.