On Friday 11 November 2011 17:07:46 Andy Fleming wrote:
> On Thu, Nov 10, 2011 at 6:11 PM, Mike Frysinger <vap...@gentoo.org> wrote:
> > diff --git a/include/net.h b/include/net.h
> > index ad9afbf..b4acd8f 100644
> > --- a/include/net.h
> > +++ b/include/net.h
> > @@ -66,8 +66,6 @@ typedef void rxhand_icmp_f(unsigned type, unsigned
> > code, unsigned dport, */
> >  typedef void   thand_f(void);
> > 
> > -#define NAMESIZE 16
> > -
> >  enum eth_state_t {
> >        ETH_STATE_INIT,
> >        ETH_STATE_PASSIVE,
> > @@ -75,7 +73,7 @@ enum eth_state_t {
> >  };
> > 
> >  struct eth_device {
> > -       char name[NAMESIZE];
> > +       char name[16];
> 
> I like all of the earlier NAMESIZE->sizeof changes, but I'm not as
> comfortable with changing the various name declarations. Seems like we
> might want named constants for them, just so any dependencies can be
> clearly-documented. For instance, in Linux the MDIO bus specifiers are
> designed to be bigger than the MDIO device name, and the size
> declarations reflect this.

sounds like something that can easily be expressed with:
        BUILD_BUG_ON(sizeof(dev->name) < sizeof(mii->name));
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to