[U-Boot] [PATCH v2 17/21] net: cosmetic: Rename CDPHandler to CDPReceive

Simon Glass sjg at chromium.org
Fri Apr 27 08:23:10 CEST 2012


Hi Joe,

On Wed, Mar 28, 2012 at 12:42 PM, Joe Hershberger <joe.hershberger at ni.com>wrote:

> This is not called as a handler, so don't name it that way
>
> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Joe Hershberger <joe.hershberger at gmail.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Mike Frysinger <vapier at gentoo.org>
> ---
> Changes for v2:
>   - Split from "Improve variable names and code readability"
>
>  net/cdp.c |    2 +-
>  net/cdp.h |    2 +-
>  net/net.c |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/cdp.c b/net/cdp.c
> index 6be6665..5c4b3e8 100644
> --- a/net/cdp.c
> +++ b/net/cdp.c
> @@ -245,7 +245,7 @@ CDPDummyHandler(uchar *pkt, unsigned dest, IPaddr_t
> sip, unsigned src,
>  }
>
>  void
> -CDPHandler(const uchar *pkt, unsigned len)
> +CDPReceive(const uchar *pkt, unsigned len)
>

cdp_receive?


>  {
>        const uchar *t;
>        const ushort *ss;
> diff --git a/net/cdp.h b/net/cdp.h
> index 93bc461..7ec5c70 100644
> --- a/net/cdp.h
> +++ b/net/cdp.h
> @@ -14,7 +14,7 @@
>  #define __CDP_H__
>
>  void CDPStart(void);
> -void CDPHandler(const uchar *pkt, unsigned len);
> +void CDPReceive(const uchar *pkt, unsigned len);
>

How about a comment on the function?


>
>  #endif /* __CDP_H__ */
>  #endif
> diff --git a/net/net.c b/net/net.c
> index aa1ae05..4736ba1 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -943,7 +943,7 @@ NetReceive(uchar *inpkt, int len)
>
>  #if defined(CONFIG_CMD_CDP)
>        if (iscdp) {
> -               CDPHandler((uchar *)ip, len);
> +               CDPReceive((uchar *)ip, len);
>                return;
>        }
>  #endif
> --
> 1.6.0.2
>
> Regards,
Simon


More information about the U-Boot mailing list