[U-Boot] [PATCH 16/28] net: Refactor to protect access to the NetState variable
Mike Frysinger
vapier at gentoo.org
Fri Feb 3 13:17:54 CET 2012
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: <http://lists.denx.de/pipermail/u-boot/attachments/20120203/f017eb94/attachment.pgp>
More information about the U-Boot
mailing list