
This removes the following checkpatch issue: - ERROR: return is not a function, parentheses are not required
Signed-off-by: Luca Ceresoli luca.ceresoli@comelit.it Cc: Wolfgang Denk wd@denx.de Cc: Ben Warren biggerbadderben@gmail.com Cc: Mike Frysinger vapier@gentoo.org
--- Changes since v1: none.
net/net.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/net/net.c b/net/net.c index f8c852d..63fc60a 100644 --- a/net/net.c +++ b/net/net.c @@ -383,7 +383,7 @@ NetLoop(proto_t protocol) #endif if (eth_init(bd) < 0) { eth_halt(); - return(-1); + return -1; }
restart: @@ -406,7 +406,7 @@ restart: case 1: /* network not configured */ eth_halt(); - return (-1); + return -1;
#ifdef CONFIG_NET_MULTI case 2: @@ -521,7 +521,7 @@ restart: if (ctrlc()) { eth_halt(); puts("\nAbort\n"); - return (-1); + return -1; }
ArpTimeoutCheck(); @@ -578,7 +578,7 @@ restart: return NetBootFileXferSize;
case NETLOOP_FAIL: - return (-1); + return -1; } } } @@ -1753,7 +1753,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 @@ -1761,7 +1761,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 @@ -1780,7 +1780,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) @@ -1789,7 +1789,7 @@ static int net_check_prereq(proto_t protocol)
if (NetOurIP == 0) { puts("*** ERROR: `ipaddr' not set\n"); - return (1); + return 1; } /* Fall through */
@@ -1807,7 +1807,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; @@ -1818,17 +1818,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 */ } /**********************************************************************/
@@ -1850,7 +1850,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 @@ -1994,5 +1994,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)); }