[U-Boot] [PATCH 5/8] net/net.c: cosmetic: fix pointer syntax issues
Luca Ceresoli
luca.ceresoli at comelit.it
Wed May 4 14:40:44 CEST 2011
This removes the following checkpatch issues:
- ERROR: "foo * bar" should be "foo *bar"
- ERROR: "(foo*)" should be "(foo *)"
Signed-off-by: Luca Ceresoli <luca.ceresoli at comelit.it>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Ben Warren <biggerbadderben at gmail.com>
---
net/net.c | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/net/net.c b/net/net.c
index 14dc65a..0e13fb2 100644
--- a/net/net.c
+++ b/net/net.c
@@ -594,7 +594,7 @@ startAgainTimeout(void)
}
static void
-startAgainHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
+startAgainHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len)
{
/* Totally ignore the packet */
}
@@ -655,14 +655,14 @@ void NetStartAgain(void)
*/
void
-NetSetHandler(rxhand_f * f)
+NetSetHandler(rxhand_f *f)
{
packetHandler = f;
}
void
-NetSetTimeout(ulong iv, thand_f * f)
+NetSetTimeout(ulong iv, thand_f *f)
{
if (iv == 0) {
timeHandler = (thand_f *)0;
@@ -675,7 +675,7 @@ NetSetTimeout(ulong iv, thand_f * f)
void
-NetSendPacket(volatile uchar * pkt, int len)
+NetSendPacket(volatile uchar *pkt, int len)
{
(void) eth_send(pkt, len);
}
@@ -770,9 +770,9 @@ int PingSend(void)
ip->ip_p = 0x01; /* ICMP */
ip->ip_sum = 0;
/* already in network byte order */
- NetCopyIP((void*)&ip->ip_src, &NetOurIP);
+ NetCopyIP((void *)&ip->ip_src, &NetOurIP);
/* - "" - */
- NetCopyIP((void*)&ip->ip_dst, &NetPingIP);
+ NetCopyIP((void *)&ip->ip_dst, &NetPingIP);
ip->ip_sum = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2);
s = &ip->udp_src; /* XXX ICMP starts here */
@@ -801,7 +801,7 @@ PingTimeout(void)
}
static void
-PingHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
+PingHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len)
{
IPaddr_t tmp;
volatile IP_t *ip = (volatile IP_t *)pkt;
@@ -1044,13 +1044,13 @@ CDPTimeout(void)
}
static void
-CDPDummyHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
+CDPDummyHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len)
{
/* nothing */
}
static void
-CDPHandler(const uchar * pkt, unsigned len)
+CDPHandler(const uchar *pkt, unsigned len)
{
const uchar *t;
const ushort *ss;
@@ -1356,7 +1356,7 @@ static inline IP_t *NetDefragment(IP_t *ip, int *lenp)
#endif
void
-NetReceive(volatile uchar * inpkt, int len)
+NetReceive(volatile uchar *inpkt, int len)
{
Ethernet_t *et;
IP_t *ip;
@@ -1665,8 +1665,8 @@ NetReceive(volatile uchar * inpkt, int len)
ip->ip_sum = 0;
ip->ip_off = 0;
- NetCopyIP((void*)&ip->ip_dst, &ip->ip_src);
- NetCopyIP((void*)&ip->ip_src, &NetOurIP);
+ NetCopyIP((void *)&ip->ip_dst, &ip->ip_src);
+ NetCopyIP((void *)&ip->ip_src, &NetOurIP);
ip->ip_sum = ~NetCksum((uchar *)ip,
IP_HDR_SIZE_NO_UDP >> 1);
@@ -1836,14 +1836,14 @@ static int net_check_prereq(proto_t protocol)
/**********************************************************************/
int
-NetCksumOk(uchar * ptr, int len)
+NetCksumOk(uchar *ptr, int len)
{
return !((NetCksum(ptr, len) + 1) & 0xfffe);
}
unsigned
-NetCksum(uchar * ptr, int len)
+NetCksum(uchar *ptr, int len)
{
ulong xsum;
ushort *p = (ushort *)ptr;
@@ -1870,7 +1870,7 @@ NetEthHdrSize(void)
}
int
-NetSetEther(volatile uchar * xet, uchar * addr, uint prot)
+NetSetEther(volatile uchar *xet, uchar * addr, uint prot)
{
Ethernet_t *et = (Ethernet_t *)xet;
ushort myvlanid;
@@ -1895,7 +1895,7 @@ NetSetEther(volatile uchar * xet, uchar * addr, uint prot)
}
void
-NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len)
+NetSetIP(volatile uchar *xip, IPaddr_t dest, int dport, int sport, int len)
{
IP_t *ip = (IP_t *)xip;
@@ -1921,9 +1921,9 @@ NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len)
ip->ip_p = 17; /* UDP */
ip->ip_sum = 0;
/* already in network byte order */
- NetCopyIP((void*)&ip->ip_src, &NetOurIP);
+ NetCopyIP((void *)&ip->ip_src, &NetOurIP);
/* - "" - */
- NetCopyIP((void*)&ip->ip_dst, &dest);
+ NetCopyIP((void *)&ip->ip_dst, &dest);
ip->udp_src = htons(sport);
ip->udp_dst = htons(dport);
ip->udp_len = htons(8 + len);
--
1.7.1
More information about the U-Boot
mailing list