]> git.sur5r.net Git - u-boot/commitdiff
net: cosmetic: net.c checkpatch compliance
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 15 May 2012 08:59:08 +0000 (08:59 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Tue, 15 May 2012 22:16:19 +0000 (17:16 -0500)
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
common/main.c
include/common.h
include/net.h
net/net.c

index 3b9e39a9805b9da3831edef2177c44b00c72893e..a93335798bd0dd887f96da3f36f16ec2f42f812c 100644 (file)
@@ -973,7 +973,6 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)
 
 #ifdef CONFIG_SHOW_ACTIVITY
                while (!tstc()) {
-                       extern void show_activity(int arg);
                        show_activity(0);
                        WATCHDOG_RESET();
                }
index 4b5841ef47015925cd78cebe5c2e0c07ac8445af..7338e39d1373582e158c67a0420c3da85a474fd8 100644 (file)
@@ -794,6 +794,10 @@ int        pcmcia_init (void);
 
 #include <bootstage.h>
 
+#ifdef CONFIG_SHOW_ACTIVITY
+void show_activity(int arg);
+#endif
+
 /* Multicore arch functions */
 #ifdef CONFIG_MP
 int cpu_status(int nr);
index 2b6e59a7bf580040ade06d19166921a239d3c01c..3dbe1544ac3a1cc888cf3149718c53cc76179078 100644 (file)
@@ -433,6 +433,11 @@ extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport,
 /* Processes a received packet */
 extern void NetReceive(uchar *, int);
 
+#ifdef CONFIG_NETCONSOLE
+void NcStart(void);
+int nc_input_packet(uchar *pkt, unsigned dest, unsigned src, unsigned len);
+#endif
+
 /*
  * Check if autoload is enabled. If so, use either NFS or TFTP to download
  * the boot file.
index 9a0417dfc666d8953f594f3384ba2b88bd044325..14352452719c51caddfc5e650a740f66be16aee9 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -77,6 +77,7 @@
 #include <common.h>
 #include <watchdog.h>
 #include <command.h>
+#include <linux/compiler.h>
 #include <net.h>
 #include "bootp.h"
 #include "tftp.h"
@@ -203,11 +204,6 @@ IPaddr_t   NetNtpServerIP;
 int            NetTimeOffset;
 #endif
 
-#ifdef CONFIG_NETCONSOLE
-void NcStart(void);
-int nc_input_packet(uchar *pkt, unsigned dest, unsigned src, unsigned len);
-#endif
-
 uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
 
 /* Receive packet */
@@ -527,10 +523,7 @@ restart:
        for (;;) {
                WATCHDOG_RESET();
 #ifdef CONFIG_SHOW_ACTIVITY
-               {
-                       extern void show_activity(int arg);
-                       show_activity(1);
-               }
+               show_activity(1);
 #endif
                /*
                 *      Check the ethernet for a new packet.  The ethernet
@@ -1103,8 +1096,8 @@ CDPHandler(const uchar *pkt, unsigned len)
         * output a warning
         */
        if (pkt[0] != 0x02)
-               printf("** WARNING: CDP packet received with a protocol version %d > 2\n",
-                               pkt[0] & 0xff);
+               printf("**WARNING: CDP packet received with a protocol version "
+                               "%d > 2\n", pkt[0] & 0xff);
 
        if (CDP_compute_csum(pkt, len) != 0)
                return;
@@ -1239,7 +1232,7 @@ struct hole {
 
 static IP_t *__NetDefragment(IP_t *ip, int *lenp)
 {
-       static uchar pkt_buff[IP_PKTSIZE] __attribute__((aligned(PKTALIGN)));
+       static uchar pkt_buff[IP_PKTSIZE] __aligned(PKTALIGN);
        static u16 first_hole, total_len;
        struct hole *payload, *thisfrag, *h, *newh;
        IP_t *localip = (IP_t *)pkt_buff;
@@ -1611,6 +1604,7 @@ NetReceive(uchar *inpkt, int len)
                        /* matched waiting packet's address */
                        if (tmp == NetArpWaitReplyIP) {
                                debug("Got it\n");
+
                                /* save address for later use */
                                memcpy(NetArpWaitPacketMAC,
                                       &arp->ar_data[0], 6);
@@ -1619,7 +1613,8 @@ NetReceive(uchar *inpkt, int len)
                                (*packetHandler)(0, 0, 0, 0, 0);
 #endif
                                /* modify header, and transmit it */
-                               memcpy(((Ethernet_t *)NetArpWaitTxPacket)->et_dest, NetArpWaitPacketMAC, 6);
+                               memcpy(((Ethernet_t *)NetArpWaitTxPacket)->
+                                       et_dest, NetArpWaitPacketMAC, 6);
                                (void) eth_send(NetArpWaitTxPacket,
                                                NetArpWaitTxPacketSize);
 
@@ -1856,7 +1851,6 @@ common:
        case CDP:
        case DHCP:
                if (memcmp(NetOurEther, "\0\0\0\0\0\0", 6) == 0) {
-                       extern int eth_get_dev_index(void);
                        int num = eth_get_dev_index();
 
                        switch (num) {