[SSI] openssi/kernel/cluster/ssi/vproc dvp_pvpsops.c,1.20,1.21

Roger Tsang <[email protected]> Mon, 25 Oct 2010 05:08:02 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv3259/cluster/ssi/vproc

Modified Files:
      Tag: OPENSSI-FC
	dvp_pvpsops.c 
Log Message:
Optimize away unnecessary initialization in pvpsop_get_tgid_list().


Index: dvp_pvpsops.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/dvp_pvpsops.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- dvp_pvpsops.c	13 Feb 2010 14:57:54 -0000	1.20
+++ dvp_pvpsops.c	25 Oct 2010 05:07:59 -0000	1.21
@@ -930,11 +930,8 @@
 	int *hash_index,
 	int *vproc_index)
 {
-	int count = 0;
-	int lcount = 0;
 	struct vproc *vp;
-	int i;
-	int elem_index;
+	int count, lcount, i, elem_index;
 
 	/*
 	 * If the specified node is not the local node,
@@ -958,7 +955,10 @@
 			return -ENOMEM;
 		}
 	}
+
+	lcount = count = 0;
 	elem_index = *vproc_index;
+
 	/*
 	 * Look through vproc hash table and fill in arrays
 	 * Since vprocs are added to the front of the chain, it
@@ -1000,9 +1000,9 @@
 #ifdef VPROC_RCU_LIST
 		rcu_read_unlock();
 #endif
-		elem_index = 0;
 		if (count >= *pids_size)
 			break;
+		elem_index = 0;
 	}
 #ifndef VPROC_RCU_LIST
 	VPROC_LIST_UNLOCK();


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev