Skip to contentSkip to conversation

2.4.27-pre2-pac1

DISCUSSION O.Sezer 1 participant 1 message May 6, 2004

Subsystems (2)
lore
Share & tools
lore

O.Sezer

author
#0 lore raw

Another one: This removes duplicate fls defines.

Regards;
Özkan Sezer

include/net/sctp/compat.h +0 -31
diff -urN 27p2.pac1/include/net/sctp/compat.h 27p2.acx1/include/net/sctp/compat.h
@@ -95,36 +95,5 @@
 #define sk_wmem_queued wmem_queued
 #define sk_bound_dev_if bound_dev_if
 
-/*
- * find last bit set.
- */
-static __inline__ int fls(int x)
-{
-	int r = 32;
-	
-	if (!x)
-		return 0;
-	if (!(x & 0xffff0000u)) {
-		x <<= 16;
-		r -= 16;
-	}
-	if (!(x & 0xff000000u)) {
-		x <<= 8;
-		r -= 8;
-	}
-	if (!(x & 0xf0000000u)) {
-		x <<= 4;
-		r -= 4;
-	}
-	if (!(x & 0xc0000000u)) {
-		x <<= 2;
-		r -= 2;
-	}
-	if (!(x & 0x80000000u)) {
-		x <<= 1;
-		r -= 1;
-	}
-	return r;
-}
 
 #endif /* __net_sctp_compat_h__ */
include/asm-x86_64/bitops.h +7 -0
diff -urN 27p2.pac1/include/asm-x86_64/bitops.h 27p2.acx1/include/asm-x86_64/bitops.h
@@ -436,6 +436,13 @@
 	return word;
 }
 
+/*
+ * fls: find last bit set.
+ */
+
+#define fls(x) generic_fls(x)
+
+
 #ifdef __KERNEL__
 
 static inline int _sched_find_first_bit(const unsigned long *b)