Date: Fri, 15 Sep 2006 17:44:54 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 106159 for review Message-ID: <200609151744.k8FHisOf022347@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106159 Change 106159 by imp@imp_lighthouse on 2006/09/15 17:43:53 Move some globals around, remove needless initialization. This saves another 64 bytes from boot2. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#31 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#12 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac_init.c#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#31 (text+ko) ==== @@ -31,6 +31,10 @@ /* ********************** PRIVATE FUNCTIONS/DATA ******************************/ +static unsigned short serverPort; +static unsigned serverMACSet; +static unsigned localIPSet, serverIPSet; +static unsigned lastSize; static char serverMACAddr[6]; static unsigned char localIPAddr[4], serverIPAddr[4]; static int ackBlock; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#12 (text+ko) ==== @@ -129,10 +129,8 @@ extern unsigned char localMACAddr[6]; extern unsigned localMAClow, localMAChigh; -extern unsigned localMACSet, serverMACSet; +extern unsigned localMACSet; extern receive_descriptor_t *p_rxBD; -extern unsigned lastSize; -extern unsigned localIPSet, serverIPSet; -extern unsigned short serverPort, localPort; +extern unsigned short localPort; #endif /* _EMAC_H_ */ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac_init.c#5 (text+ko) ==== @@ -56,12 +56,10 @@ /* ****************************** GLOBALS *************************************/ -unsigned lastSize; -unsigned localMACSet, serverMACSet; +unsigned localMACSet; unsigned char localMACAddr[6]; unsigned localMAClow, localMAChigh; -unsigned localIPSet, serverIPSet; -unsigned short serverPort, localPort; +unsigned short localPort; receive_descriptor_t *p_rxBD; /* ********************** PRIVATE FUNCTIONS/DATA ******************************/ @@ -130,10 +128,5 @@ EMAC_Init(void) { p_rxBD = (receive_descriptor_t*)RX_BUFFER_START; - localMACSet = 0; - serverMACSet = 0; - localIPSet = 0; - serverIPSet = 0; localPort = SWAP16(0x8002); - lastSize = 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609151744.k8FHisOf022347>