/* 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.
 
 #include <common.h>
 #include <watchdog.h>
 #include <command.h>
+#include <linux/compiler.h>
 #include <net.h>
 #include "bootp.h"
 #include "tftp.h"
 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 */
        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
         * 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;
 
 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;
                        /* matched waiting packet's address */
                        if (tmp == NetArpWaitReplyIP) {
                                debug("Got it\n");
+
                                /* save address for later use */
                                memcpy(NetArpWaitPacketMAC,
                                       &arp->ar_data[0], 6);
                                (*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);
 
        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) {