This removes the following checkpatch issues:
- ERROR: space prohibited after that open parenthesis '('
- ERROR: space prohibited before that close parenthesis ')'
- ERROR: space prohibited after that open square bracket '['
- ERROR: space prohibited after that '&' (ctx:WxW)
- ERROR: spaces required around that '=' (ctx:VxW)
- ERROR: space required before the open parenthesis '('
- ERROR: space required after that ',' (ctx:VxV)
- ERROR: need consistent spacing around '+' (ctx:WxV)
- WARNING: unnecessary whitespace before a quoted newline
- WARNING: please, no spaces at the start of a line
- WARNING: space prohibited between function name and open
parenthesis '('
Signed-off-by: Luca Ceresoli
Cc: Wolfgang Denk
Cc: Ben Warren
Cc: Mike Frysinger
---
Changes since v1: none.
net/net.c | 192 ++--
1 files changed, 96 insertions(+), 96 deletions(-)
diff --git a/net/net.c b/net/net.c
index 4715699..172f4d5 100644
--- a/net/net.c
+++ b/net/net.c
@@ -226,7 +226,7 @@ static ulongtimeDelta;
/* THE transmit packet */
volatile uchar *NetTxPacket;
-static int net_check_prereq (proto_t protocol);
+static int net_check_prereq(proto_t protocol);
static int NetTryCount;
@@ -243,7 +243,7 @@ uchar NetArpWaitPacketBuf[PKTSIZE_ALIGN +
PKTALIGN];
ulong NetArpWaitTimerStart;
intNetArpWaitTry;
-void ArpRequest (void)
+void ArpRequest(void)
{
int i;
volatile uchar *pkt;
@@ -253,20 +253,20 @@ void ArpRequest (void)
pkt = NetTxPacket;
- pkt += NetSetEther (pkt, NetBcastAddr, PROT_ARP);
+ pkt += NetSetEther(pkt, NetBcastAddr, PROT_ARP);
arp = (ARP_t *) pkt;
- arp->ar_hrd = htons (ARP_ETHER);
- arp->ar_pro = htons (PROT_IP);
+ arp->ar_hrd = htons(ARP_ETHER);
+ arp->ar_pro = htons(PROT_IP);
arp->ar_hln = 6;
arp->ar_pln = 4;
- arp->ar_op = htons (ARPOP_REQUEST);
+ arp->ar_op = htons(ARPOP_REQUEST);
/* source ET addr */
- memcpy (&arp->ar_data[0], NetOurEther, 6);
+ memcpy(&arp->ar_data[0], NetOurEther, 6);
/* source IP addr */
- NetWriteIP ((uchar *) & arp->ar_data[6], NetOurIP);
+ NetWriteIP((uchar *) &arp->ar_data[6], NetOurIP);
for (i = 10; i < 16; ++i) {
/* dest ET addr = 0 */
arp->ar_data[i] = 0;
@@ -275,7 +275,7 @@ void ArpRequest (void)
if ((NetArpWaitPacketIP & NetOurSubnetMask) !=
(NetOurIP & NetOurSubnetMask)) {
if (NetOurGatewayIP == 0) {
- puts ("## Warning: gatewayip needed but not set\n");
+ puts("## Warning: gatewayip needed but not set\n");
NetArpWaitReplyIP = NetArpWaitPacketIP;
} else {
NetArpWaitReplyIP = NetOurGatewayIP;
@@ -284,8 +284,8 @@ void ArpRequest (void)
NetArpWaitReplyIP = NetArpWaitPacketIP;
}
- NetWriteIP ((uchar *) & arp->ar_data[16], NetArpWaitReplyIP);
- (void) eth_send (NetTxPacket, (pkt - NetTxPacket) + ARP_HDR_SIZE);
+ NetWriteIP((uchar *) &arp->ar_data[16], NetArpWaitReplyIP);
+ (void) eth_send(NetTxPacket, (pkt - NetTxPacket) + ARP_HDR_SIZE);
}
void ArpTimeoutCheck(void)
@@ -302,7 +302,7 @@ void ArpTimeoutCheck(void)
NetArpWaitTry++;
if (NetArpWaitTry >= ARP_TIMEOUT_COUNT) {
- puts ("\nARP Retry count exceeded; starting again\n");
+ puts("\nARP Retry count exceeded; starting again\n");
NetArpWaitTry = 0;
NetStartAgain();
} else {
@@ -317,14 +317,14 @@ NetInitLoop(proto_t protocol)
{
static int env_changed_id;
bd_t *bd = gd->bd;
- int env_id = get_env_id ();
+ int env_id = get_env_id();
/* update only when the environment has changed */
if (env_changed_id != env_id) {
NetCopyIP(&NetOurIP, &bd->bi_ip_addr);
- NetOurGatewayIP = getenv_IPaddr ("gatewayip");
- NetOurSubnetMask= getenv_IPaddr ("netmask");
- NetServerIP = getenv_IPaddr ("serverip");
+ NetOurGatewayIP = getenv_IPaddr("gatewayip");
+ NetOurSubnetMask = getenv_IPaddr("netmask");
+ NetServerIP = getenv_IPaddr("serverip");
NetOurNativeVLAN = getenv_VLAN("nvlan");
NetOurVLAN = getenv_VLAN("vlan");
#if defined(CONFIG_CMD_DNS)
@@ -389,7 +389,7 @@ NetLoop(proto_t protocol)
restart:
#ifdef CONFIG_NET_MULTI
- memcpy (NetOurEther, eth_get_dev()->enetaddr, 6);
+ memcpy(NetOurEther, eth_get_dev()->enetaddr, 6);
#else
eth_getenv_enetaddr("ethaddr", NetOurEther);
#endif
@@ -403,7 +403,7 @@ restart:
*/
NetInitLoop(protocol);
- switch (net_check_prereq (protocol)) {
+ switch