summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2012-10-29 13:34:33 +0000
committerTom Rini <trini@ti.com>2012-11-04 11:00:36 -0700
commit0637059088a2579b3c0d67a5ca7d34dd7721204f (patch)
tree0b7a7c8ab18a3aa7745f33bc4145136c1ac7e7b9 /net
parent199adb601ff34bdbbd0667fac80dfe0a87bffc2b (diff)
net/: sparse fixes
bootp.c:44:14: warning: symbol 'dhcp_state' was not declared. Should it be static? bootp.c:45:15: warning: symbol 'dhcp_leasetime' was not declared. Should it be static? bootp.c:46:10: warning: symbol 'NetDHCPServerIP' was not declared. Should it be static? arp.c:30:17: warning: symbol 'NetArpWaitReplyIP' was not declared. Should it be static? arp.c:37:16: warning: symbol 'NetArpTxPacket' was not declared. Should it be static? arp.c:38:17: warning: symbol 'NetArpPacketBuf' was not declared. Should it be static? atheros.c:33:19: warning: symbol 'AR8021_driver' was not declared. Should it be static? net.c:183:7: warning: symbol 'PktBuf' was not declared. Should it be static? net.c:159:21: warning: symbol 'net_state' was not declared. Should it be static? ping.c:73:6: warning: symbol 'ping_start' was not declared. Should it be static? ping.c:82:13: warning: symbol 'ping_receive' was not declared. Should it be static? tftp.c:53:7: warning: symbol 'TftpRRQTimeoutMSecs' was not declared. Should it be static? tftp.c:54:5: warning: symbol 'TftpRRQTimeoutCountMax' was not declared. Should it be static? eth.c:125:19: warning: symbol 'eth_current' was not declared. Should it be static? Note: in the ping.c fix, commit a36b12f95a29647a06b5459198684fc142482020 "net: Move PING out of net.c" mistakenly carried the ifdef CMD_PING clause from when it was necessary to avoid warnings when it was embedded in net.c. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'net')
-rw-r--r--net/arp.c6
-rw-r--r--net/bootp.c6
-rw-r--r--net/net.c2
-rw-r--r--net/ping.h3
-rw-r--r--net/tftp.h3
5 files changed, 10 insertions, 10 deletions
diff --git a/net/arp.c b/net/arp.c
index 8e1d2edd620..20c6b2d42ac 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -27,15 +27,15 @@
#endif
IPaddr_t NetArpWaitPacketIP;
-IPaddr_t NetArpWaitReplyIP;
+static IPaddr_t NetArpWaitReplyIP;
/* MAC address of waiting packet's destination */
uchar *NetArpWaitPacketMAC;
int NetArpWaitTxPacketSize;
ulong NetArpWaitTimerStart;
int NetArpWaitTry;
-uchar *NetArpTxPacket; /* THE ARP transmit packet */
-uchar NetArpPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
+static uchar *NetArpTxPacket; /* THE ARP transmit packet */
+static uchar NetArpPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
void ArpInit(void)
{
diff --git a/net/bootp.c b/net/bootp.c
index cd5c5dd1d74..4300f1c2f19 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -41,9 +41,9 @@ ulong BootpID;
int BootpTry;
#if defined(CONFIG_CMD_DHCP)
-dhcp_state_t dhcp_state = INIT;
-unsigned long dhcp_leasetime;
-IPaddr_t NetDHCPServerIP;
+static dhcp_state_t dhcp_state = INIT;
+static unsigned long dhcp_leasetime;
+static IPaddr_t NetDHCPServerIP;
static void DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
unsigned len);
diff --git a/net/net.c b/net/net.c
index 569fec41e73..82c4cc91179 100644
--- a/net/net.c
+++ b/net/net.c
@@ -180,7 +180,7 @@ IPaddr_t NetNtpServerIP;
int NetTimeOffset;
#endif
-uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
+static uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
/* Receive packet */
uchar *NetRxPackets[PKTBUFSRX];
diff --git a/net/ping.h b/net/ping.h
index fd8d8d9778b..8c71be4fdf0 100644
--- a/net/ping.h
+++ b/net/ping.h
@@ -8,8 +8,6 @@
* Copyright 2000-2002 Wolfgang Denk, wd@denx.de
*/
-#if defined(CONFIG_CMD_PING)
-
#ifndef __PING_H__
#define __PING_H__
@@ -31,4 +29,3 @@ void ping_start(void);
void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len);
#endif /* __PING_H__ */
-#endif
diff --git a/net/tftp.h b/net/tftp.h
index 18e4c9c25d7..2b686e3ca6a 100644
--- a/net/tftp.h
+++ b/net/tftp.h
@@ -22,6 +22,9 @@ void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */
extern void TftpStartServer(void); /* Wait for incoming TFTP put */
#endif
+extern ulong TftpRRQTimeoutMSecs;
+extern int TftpRRQTimeoutCountMax;
+
/**********************************************************************/
#endif /* __TFTP_H__ */