Re: 2.4.27-pre2-pac1

From: O.Sezer
Date: Thu May 06 2004 - 10:09:17 EST


Another one: This removes duplicate fls defines.

Regards;
Özkan Sezer
diff -urN 27p2.pac1/include/net/sctp/compat.h 27p2.acx1/include/net/sctp/compat.h
--- 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__ */
diff -urN 27p2.pac1/include/asm-x86_64/bitops.h 27p2.acx1/include/asm-x86_64/bitops.h
--- 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)