[U-Boot] [PATCH 6/8] net/net.c: cosmetic: parentheses not required for return

Luca Ceresoli luca.ceresoli at comelit.it
Wed May 4 14:40:45 CEST 2011


This removes the following checkpatch issue:
 - ERROR: return is not a function, parentheses are not required

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 |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/net/net.c b/net/net.c
index 0e13fb2..2bffc5b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -385,7 +385,7 @@ NetLoop(proto_t protocol)
 #endif
 	if (eth_init(bd) < 0) {
 		eth_halt();
-		return(-1);
+		return -1;
 	}
 
 restart:
@@ -408,7 +408,7 @@ restart:
 	case 1:
 		/* network not configured */
 		eth_halt();
-		return (-1);
+		return -1;
 
 #ifdef CONFIG_NET_MULTI
 	case 2:
@@ -523,7 +523,7 @@ restart:
 		if (ctrlc()) {
 			eth_halt();
 			puts("\nAbort\n");
-			return (-1);
+			return -1;
 		}
 
 		ArpTimeoutCheck();
@@ -580,7 +580,7 @@ restart:
 			return NetBootFileXferSize;
 
 		case NETLOOP_FAIL:
-			return (-1);
+			return -1;
 		}
 	}
 }
@@ -1756,7 +1756,7 @@ static int net_check_prereq(proto_t protocol)
 	case PING:
 		if (NetPingIP == 0) {
 			puts("*** ERROR: ping address not given\n");
-			return (1);
+			return 1;
 		}
 		goto common;
 #endif
@@ -1764,7 +1764,7 @@ static int net_check_prereq(proto_t protocol)
 	case SNTP:
 		if (NetNtpServerIP == 0) {
 			puts("*** ERROR: NTP server address not given\n");
-			return (1);
+			return 1;
 		}
 		goto common;
 #endif
@@ -1783,7 +1783,7 @@ static int net_check_prereq(proto_t protocol)
 	case TFTP:
 		if (NetServerIP == 0) {
 			puts("*** ERROR: `serverip' not set\n");
-			return (1);
+			return 1;
 		}
 #if	defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \
 	defined(CONFIG_CMD_DNS)
@@ -1792,7 +1792,7 @@ static int net_check_prereq(proto_t protocol)
 
 		if (NetOurIP == 0) {
 			puts("*** ERROR: `ipaddr' not set\n");
-			return (1);
+			return 1;
 		}
 		/* Fall through */
 
@@ -1810,7 +1810,7 @@ static int net_check_prereq(proto_t protocol)
 			switch (num) {
 			case -1:
 				puts("*** ERROR: No ethernet found.\n");
-				return (1);
+				return 1;
 			case 0:
 				puts("*** ERROR: `ethaddr' not set\n");
 				break;
@@ -1821,17 +1821,17 @@ static int net_check_prereq(proto_t protocol)
 			}
 
 			NetStartAgain();
-			return (2);
+			return 2;
 #else
 			puts("*** ERROR: `ethaddr' not set\n");
-			return (1);
+			return 1;
 #endif
 		}
 		/* Fall through */
 	default:
-		return (0);
+		return 0;
 	}
-	return (0);		/* OK */
+	return 0;		/* OK */
 }
 /**********************************************************************/
 
@@ -1853,7 +1853,7 @@ NetCksum(uchar *ptr, int len)
 		xsum += *p++;
 	xsum = (xsum & 0xffff) + (xsum >> 16);
 	xsum = (xsum & 0xffff) + (xsum >> 16);
-	return (xsum & 0xffff);
+	return xsum & 0xffff;
 }
 
 int
@@ -1997,5 +1997,5 @@ ushort string_to_VLAN(const char *s)
 
 ushort getenv_VLAN(char *var)
 {
-	return (string_to_VLAN(getenv(var)));
+	return string_to_VLAN(getenv(var));
 }
-- 
1.7.1



More information about the U-Boot mailing list