Commit 92895de9782e17172deca2ad0b6fff6d7425ed38

Authored by Luca Ceresoli
Committed by Wolfgang Denk
1 parent 6b147d1139

net/net.c: cosmetic: parentheses not required for return

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>

Showing 1 changed file with 15 additions and 15 deletions Side-by-side Diff

... ... @@ -383,7 +383,7 @@
383 383 #endif
384 384 if (eth_init(bd) < 0) {
385 385 eth_halt();
386   - return(-1);
  386 + return -1;
387 387 }
388 388  
389 389 restart:
... ... @@ -406,7 +406,7 @@
406 406 case 1:
407 407 /* network not configured */
408 408 eth_halt();
409   - return (-1);
  409 + return -1;
410 410  
411 411 #ifdef CONFIG_NET_MULTI
412 412 case 2:
... ... @@ -521,7 +521,7 @@
521 521 if (ctrlc()) {
522 522 eth_halt();
523 523 puts("\nAbort\n");
524   - return (-1);
  524 + return -1;
525 525 }
526 526  
527 527 ArpTimeoutCheck();
... ... @@ -578,7 +578,7 @@
578 578 return NetBootFileXferSize;
579 579  
580 580 case NETLOOP_FAIL:
581   - return (-1);
  581 + return -1;
582 582 }
583 583 }
584 584 }
... ... @@ -1756,7 +1756,7 @@
1756 1756 case PING:
1757 1757 if (NetPingIP == 0) {
1758 1758 puts("*** ERROR: ping address not given\n");
1759   - return (1);
  1759 + return 1;
1760 1760 }
1761 1761 goto common;
1762 1762 #endif
... ... @@ -1764,7 +1764,7 @@
1764 1764 case SNTP:
1765 1765 if (NetNtpServerIP == 0) {
1766 1766 puts("*** ERROR: NTP server address not given\n");
1767   - return (1);
  1767 + return 1;
1768 1768 }
1769 1769 goto common;
1770 1770 #endif
... ... @@ -1782,7 +1782,7 @@
1782 1782 case TFTP:
1783 1783 if (NetServerIP == 0) {
1784 1784 puts("*** ERROR: `serverip' not set\n");
1785   - return (1);
  1785 + return 1;
1786 1786 }
1787 1787 #if defined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \
1788 1788 defined(CONFIG_CMD_DNS)
... ... @@ -1793,7 +1793,7 @@
1793 1793 case NETCONS:
1794 1794 if (NetOurIP == 0) {
1795 1795 puts("*** ERROR: `ipaddr' not set\n");
1796   - return (1);
  1796 + return 1;
1797 1797 }
1798 1798 /* Fall through */
1799 1799  
... ... @@ -1811,7 +1811,7 @@
1811 1811 switch (num) {
1812 1812 case -1:
1813 1813 puts("*** ERROR: No ethernet found.\n");
1814   - return (1);
  1814 + return 1;
1815 1815 case 0:
1816 1816 puts("*** ERROR: `ethaddr' not set\n");
1817 1817 break;
1818 1818  
1819 1819  
1820 1820  
... ... @@ -1822,17 +1822,17 @@
1822 1822 }
1823 1823  
1824 1824 NetStartAgain();
1825   - return (2);
  1825 + return 2;
1826 1826 #else
1827 1827 puts("*** ERROR: `ethaddr' not set\n");
1828   - return (1);
  1828 + return 1;
1829 1829 #endif
1830 1830 }
1831 1831 /* Fall through */
1832 1832 default:
1833   - return (0);
  1833 + return 0;
1834 1834 }
1835   - return (0); /* OK */
  1835 + return 0; /* OK */
1836 1836 }
1837 1837 /**********************************************************************/
1838 1838  
... ... @@ -1854,7 +1854,7 @@
1854 1854 xsum += *p++;
1855 1855 xsum = (xsum & 0xffff) + (xsum >> 16);
1856 1856 xsum = (xsum & 0xffff) + (xsum >> 16);
1857   - return (xsum & 0xffff);
  1857 + return xsum & 0xffff;
1858 1858 }
1859 1859  
1860 1860 int
... ... @@ -1998,6 +1998,6 @@
1998 1998  
1999 1999 ushort getenv_VLAN(char *var)
2000 2000 {
2001   - return (string_to_VLAN(getenv(var)));
  2001 + return string_to_VLAN(getenv(var));
2002 2002 }