[2.5 PATCH] __ffs implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

	Fixes __ffs(x) implementation for the 2.5.4 kernel on mips and
mips64 : ffz(~x) instead of ffz(x).

Vivien.

--- linux/include/asm-mips/bitops.h	Mon Jul  8 22:28:08 2002
+++ linux.patch/include/asm-mips/bitops.h	Fri Jul 12 00:04:26 2002
@@ -732,7 +732,7 @@
  */
 static __inline__ unsigned long __ffs(unsigned long word)
 {
-	return ffz(word);
+	return ffz(~word);
 }
 
 #ifdef __KERNEL__
--- linux/include/asm-mips64/bitops.h	Wed Jul 10 00:30:31 2002
+++ linux.patch/include/asm-mips64/bitops.h	Fri Jul 12 00:04:13 2002
@@ -444,7 +444,7 @@
  */
 static __inline__ unsigned long __ffs(unsigned long word)
 {
-	return ffz(word);
+	return ffz(~word);
 }
 
 /*


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux