[U-Boot] [PATCH 2/3] net: add getenv/setenv enetaddr function to use ethernet device num

Wolfgang Denk wd at denx.de
Wed Aug 12 23:32:32 CEST 2009


Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20090812205833.GD21725 at game.jcrosoft.org> you wrote:
>
> > - There is no commit message and no description what this patch is
> >   supposed to do or to fix. Why should we add it?
> just to stop to duplicate this in every driver

I would expect then that you remove such duplicated code from "every
driver", but I do not see any such removal?

> > > index 2a8a12d..dc4ae41 100644
> > > --- a/include/net.h
> > > +++ b/include/net.h
> > > @@ -124,6 +124,8 @@ extern void eth_set_enetaddr(int num, char* a);	/* Set new MAC address */
> > >  extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
> > >  extern int eth_getenv_enetaddr(char *name, uchar *enetaddr);
> > >  extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
> > > +extern int eth_getenv_num_enetaddr(int num, uchar *enetaddr);
> > > +extern int eth_setenv_num_enetaddr(int num, const uchar *enetaddr);
> > 
> > What are these functions god for? Are they by any chance duplicationg
> > existing code, got example eth_getenv_enetaddr_by_index() ?
> the get yes but not there is no set

Makes no sense to me. Above you claim you want to avoid code
duplication, and here you duplicate existing functions? Please use the
existing code instead, and add only what might be missing.

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
"An organization dries up if you don't challenge it with growth."
       - Mark Shepherd, former President and CEO of Texas Instruments


More information about the U-Boot mailing list