[U-Boot] [PATCH 05/28] net: Move CDP out of net.c
Mike Frysinger
vapier at gentoo.org
Fri Feb 3 12:55:38 CET 2012
On Thursday 19 January 2012 19:53:08 Joe Hershberger wrote:
> --- a/include/net.h
> +++ b/include/net.h
>
> +int is_cdp_packet(const uchar *et_addr);
seems like this would be better as a static inline since it's just a memcmp
> --- /dev/null
> +++ b/net/cdp.h
> @@ -0,0 +1,18 @@
> +/*
> + * Copied from Linux Monitor (LiMon) - Networking.
> + *
> + * Copyright 1994 - 2000 Neil Russell.
> + * (See License)
> + * Copyright 2000 Roland Borde
> + * Copyright 2000 Paolo Scaffardi
> + * Copyright 2000-2002 Wolfgang Denk, wd at denx.de
> + */
> +
> +#ifndef __CDP_H__
> +#define __CDP_H__
> +
> +void CDPStart(void);
> +void CDPHandler(const uchar *pkt, unsigned len);
> +
> +#endif /* __CDP_H__ */
> +
no blank newlines at end of files
> --- a/net/net.c
> +++ b/net/net.c
>
> +#if defined(CONFIG_CMD_CDP)
> +#include "cdp.h"
> #endif
let's push this ifdef down into cdp.h
-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/668f55cb/attachment.pgp>
More information about the U-Boot
mailing list