From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] net/miiphy/serial: drop duplicate "NAMESIZE" define
Date: Fri, 11 Nov 2011 17:47:41 -0500 [thread overview]
Message-ID: <201111111747.42924.vapier@gentoo.org> (raw)
In-Reply-To: <CAKWjMd41B11SKWrqaFLDeqeZTQn4cvMFCAk6_jGU6KkwdSJHEw@mail.gmail.com>
On Friday 11 November 2011 17:07:46 Andy Fleming wrote:
> On Thu, Nov 10, 2011 at 6:11 PM, Mike Frysinger <vapier@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
-------------- 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/20111111/5b759da0/attachment.pgp
next prev parent reply other threads:[~2011-11-11 22:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 0:11 [U-Boot] [PATCH 1/4] net/miiphy/serial: drop duplicate "NAMESIZE" define Mike Frysinger
2011-11-11 0:11 ` [U-Boot] [PATCH 2/4] net: tweak eth_device layout to simplify enetaddr use Mike Frysinger
2011-11-11 11:19 ` thomas.langer at lantiq.com
2011-11-11 11:55 ` Wolfgang Denk
2011-11-11 15:03 ` Mike Frysinger
2011-11-11 15:44 ` Andy Fleming
2011-11-11 16:06 ` Mike Frysinger
2011-12-05 21:06 ` Wolfgang Denk
2011-11-11 0:11 ` [U-Boot] [PATCH 3/4] Blackfin: bfin_mac: use new eth_device enetaddr members Mike Frysinger
2011-11-11 0:11 ` [U-Boot] [PATCH 4/4] usb: net: smsc95xx: attempt to fix enetaddr loading Mike Frysinger
2011-11-11 22:07 ` [U-Boot] [PATCH 1/4] net/miiphy/serial: drop duplicate "NAMESIZE" define Andy Fleming
2011-11-11 22:47 ` Mike Frysinger [this message]
2012-03-18 19:11 ` Wolfgang Denk
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=201111111747.42924.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox