[U-Boot] [PATCH v3 17/21] net: cosmetic: Rename CDPHandler to cdp_receive

Joe Hershberger joe.hershberger at ni.com
Wed May 23 19:58:13 CEST 2012


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>
---
Changes for v2:
   - Split from "Improve variable names and code readability"
Changes for v3:
   - Added a function comment
   - Renamed CDPReceive to cdp_receive

 net/cdp.c |    3 +--
 net/cdp.h |    3 ++-
 net/net.c |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/cdp.c b/net/cdp.c
index 63be570..9bec441 100644
--- a/net/cdp.c
+++ b/net/cdp.c
@@ -245,8 +245,7 @@ CDPDummyHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
 	/* nothing */
 }
 
-void
-CDPHandler(const uchar *pkt, unsigned len)
+void cdp_receive(const uchar *pkt, unsigned len)
 {
 	const uchar *t;
 	const ushort *ss;
diff --git a/net/cdp.h b/net/cdp.h
index 93bc461..ec7315a 100644
--- a/net/cdp.h
+++ b/net/cdp.h
@@ -14,7 +14,8 @@
 #define __CDP_H__
 
 void CDPStart(void);
-void CDPHandler(const uchar *pkt, unsigned len);
+/* Process a received CDP packet */
+void cdp_receive(const uchar *pkt, unsigned len);
 
 #endif /* __CDP_H__ */
 #endif
diff --git a/net/net.c b/net/net.c
index 67921c3..f6d294e 100644
--- a/net/net.c
+++ b/net/net.c
@@ -940,7 +940,7 @@ NetReceive(uchar *inpkt, int len)
 
 #if defined(CONFIG_CMD_CDP)
 	if (iscdp) {
-		CDPHandler((uchar *)ip, len);
+		cdp_receive((uchar *)ip, len);
 		return;
 	}
 #endif
-- 
1.6.0.2



More information about the U-Boot mailing list