From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Fri, 3 Feb 2012 07:17:54 -0500 Subject: [U-Boot] [PATCH 16/28] net: Refactor to protect access to the NetState variable In-Reply-To: <1327020811-1538-17-git-send-email-joe.hershberger@ni.com> References: <1327020811-1538-1-git-send-email-joe.hershberger@ni.com> <1327020811-1538-17-git-send-email-joe.hershberger@ni.com> Message-ID: <201202030717.55029.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 19 January 2012 19:53:19 Joe Hershberger wrote: > Changes to NetState now go through an accessor function called > NetSetState() i'm not sure i see the value here. all i see is overhead being added. if you really want this to be an improvement, there's two minor tweaks to make. > --- a/include/net.h > +++ b/include/net.h > > +/* Network loop state */ > +extern void NetSetState(int state); make this into a static inline > +#define NETLOOP_CONTINUE 1 > +#define NETLOOP_RESTART 2 > +#define NETLOOP_SUCCESS 3 > +#define NETLOOP_FAIL 4 turn these into an enum -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: