diff options
| author | Robin Getz <rgetz@blackfin.uclinux.org> | 2009-07-23 03:01:03 -0400 | 
|---|---|---|
| committer | Ben Warren <biggerbadderben@gmail.com> | 2009-08-07 17:32:16 -0700 | 
| commit | 0ebf04c607b54a352629dcf7e76b76f1785dae54 (patch) | |
| tree | 0beff99c94a3db8d1e9cc5f3b786ae7474085f4c /net/nfs.c | |
| parent | 187af954cf7958c24efcf0fd62289bbdb4f1f24e (diff) | |
| download | olio-uboot-2014.01-0ebf04c607b54a352629dcf7e76b76f1785dae54.tar.xz olio-uboot-2014.01-0ebf04c607b54a352629dcf7e76b76f1785dae54.zip | |
minor debug cleanups in ./net
 Minor ./net cleanups - no functional changes
  - change #ifdef DEBUG printf(); #endif to just debug()
  - changed __FUNCTION__ to __func__
  - got rid of extra whitespace between function and opening brace
  - removed unnecessary braces on if statements
 gcc dead code elimination should make this functionally/size equivalent
 when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3).
 Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/nfs.c')
| -rw-r--r-- | net/nfs.c | 42 | 
1 files changed, 10 insertions, 32 deletions
| @@ -29,8 +29,6 @@  #include "nfs.h"  #include "bootp.h" -/*#define NFS_DEBUG*/ -  #if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)  #define HASHES_PER_LINE 65	/* Number of "loading" hashes per line	*/ @@ -357,9 +355,7 @@ RPC request dispatcher  static void  NfsSend (void)  { -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	switch (NfsState) {  	case STATE_PRCLOOKUP_PROG_MOUNT_REQ: @@ -397,9 +393,7 @@ rpc_lookup_reply (int prog, uchar *pkt, unsigned len)  	memcpy ((unsigned char *)&rpc_pkt, pkt, len); -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	if (ntohl(rpc_pkt.u.reply.id) != rpc_id)  		return -1; @@ -427,9 +421,7 @@ nfs_mount_reply (uchar *pkt, unsigned len)  {  	struct rpc_t rpc_pkt; -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	memcpy ((unsigned char *)&rpc_pkt, pkt, len); @@ -454,9 +446,7 @@ nfs_umountall_reply (uchar *pkt, unsigned len)  {  	struct rpc_t rpc_pkt; -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	memcpy ((unsigned char *)&rpc_pkt, pkt, len); @@ -480,9 +470,7 @@ nfs_lookup_reply (uchar *pkt, unsigned len)  {  	struct rpc_t rpc_pkt; -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	memcpy ((unsigned char *)&rpc_pkt, pkt, len); @@ -507,9 +495,7 @@ nfs_readlink_reply (uchar *pkt, unsigned len)  	struct rpc_t rpc_pkt;  	int rlen; -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	memcpy ((unsigned char *)&rpc_pkt, pkt, len); @@ -544,9 +530,7 @@ nfs_read_reply (uchar *pkt, unsigned len)  	struct rpc_t rpc_pkt;  	int rlen; -#ifdef NFS_DEBUG_nop -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	memcpy ((uchar *)&rpc_pkt, pkt, sizeof(rpc_pkt.u.reply)); @@ -601,9 +585,7 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)  {  	int rlen; -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	if (dest != NfsOurPort) return; @@ -661,9 +643,7 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)  			NfsState = STATE_UMOUNT_REQ;  			NfsSend ();  		} else { -#ifdef NFS_DEBUG -			printf ("Symlink --> %s\n", nfs_path); -#endif +			debug("Symlink --> %s\n", nfs_path);  			nfs_filename = basename (nfs_path);  			nfs_path     = dirname (nfs_path); @@ -696,9 +676,7 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)  void  NfsStart (void)  { -#ifdef NFS_DEBUG -	printf ("%s\n", __FUNCTION__); -#endif +	debug("%s\n", __func__);  	NfsDownloadState = NETLOOP_FAIL;  	NfsServerIP = NetServerIP; |