[U-Boot] [PATCH v4 2/5] Add Ethernet hardware MAC address framework to usbnet

Mike Frysinger vapier at gentoo.org
Sat Apr 30 06:58:04 CEST 2011


On Thursday, April 21, 2011 19:38:06 Wolfgang Denk wrote:
> Simon Glass wrote:
> > >> + *   base_name - base name for device (NULL for "eth")
> > > 
> > > This is an atitifical decision for the API which is difficult to
> > > understand.  It just makes the code and understanding it more
> > > difficult.  Just pass "eth" when you mean it.
> > 
> > The intention was to avoid everyone having to pass the correct value -
> > potential for error, etc. I could have created a #define, but decided
> > on this.
> 
> Ummm... but having everyone to pass the correct value is actually a
> really good thing to have!

i'm not sure about that.  it just means it's easier for people to screw it up, 
or for duplicated code to propagate via copy & paste.  the current API Simon 
has makes sense to me.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110430/eaad9e12/attachment.pgp 


More information about the U-Boot mailing list