[U-Boot-Users] [PATCH] Add ability to take MAC address from the environment to DM9000 driver
Wolfgang Denk
wd at denx.de
Wed Aug 8 08:48:04 CEST 2007
In message <46B9563B.1010807 at compulab.co.il> you wrote:
>
> > Could this ever be other than the first Ethernet controller on a board?
> > If so, 'ethaddr' won't cut it.
>
> If a board has more than one DM9000, the driver in its current state does not
> support it anyway.
Assume the board has an XXX Ethernet controller as eth0, and a DM9000
as eth1 ?
> > Please choose a better name for this function. While multicast addresses
> > are poor choices for source, they're perfectly fine for destination.
>
> What about 'is_valid_ether_src_addr'?
That's a very long name which is difficult to read, difficult to type,
and makes for very long source code lines...
And I will probably have to look up the definition of this function
each time I read the code. You use this function exactly once, so I
suggest to NOT define it at all and write down what it does:
if (!is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr)) ...
This is IMHO much better to read and to understand.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The more complex the mind, the greater the need for the simplicity of
play.
-- Kirk, "Shore Leave", stardate 3025.8
More information about the U-Boot
mailing list