



 include/linux/bitmap.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -puN include/linux/bitmap.h~cpumask_t-gcc-workaround-2 include/linux/bitmap.h
--- 25/include/linux/bitmap.h~cpumask_t-gcc-workaround-2	2003-07-10 19:00:19.000000000 -0700
+++ 25-akpm/include/linux/bitmap.h	2003-07-10 19:01:14.000000000 -0700
@@ -127,9 +127,9 @@ static inline void bitmap_or(unsigned lo
 #if BITS_PER_LONG == 32
 static inline int bitmap_weight(const unsigned long *bitmap, int bits)
 {
-	int k, w = 0;
+	int k, w = 0, lim = bits/BITS_PER_LONG;
 
-	for (k = 0; k < bits/BITS_PER_LONG; ++k)
+	for (k = 0; k < lim; k++)
 		w += hweight32(bitmap[k]);
 
 	if (bits % BITS_PER_LONG)
@@ -141,9 +141,9 @@ static inline int bitmap_weight(const un
 #else
 static inline int bitmap_weight(const unsigned long *bitmap, int bits)
 {
-	int k, w = 0;
+	int k, w = 0, lim = bits/BITS_PER_LONG;
 
-	for (k = 0; k < bits/BITS_PER_LONG; ++k)
+	for (k = 0; k < lim; k++)
 		w += hweight64(bitmap[k]);
 
 	if (bits % BITS_PER_LONG)

_
