Title: [7844] trunk/arch/blackfin/include/asm/def_LPBlackfin.h: Fix BFIN_DEPOSIT and BFIN_EXTRACT macros:
Revision
7844
Author
hennerich
Date
2009-11-18 04:52:03 -0500 (Wed, 18 Nov 2009)

Log Message

Fix BFIN_DEPOSIT and BFIN_EXTRACT macros:
find first bit in word (__ffs) returns 0 in case the first bit in word
is set.

Modified Paths

Diff

Modified: trunk/arch/blackfin/include/asm/def_LPBlackfin.h (7843 => 7844)


--- trunk/arch/blackfin/include/asm/def_LPBlackfin.h	2009-11-18 09:43:21 UTC (rev 7843)
+++ trunk/arch/blackfin/include/asm/def_LPBlackfin.h	2009-11-18 09:52:03 UTC (rev 7844)
@@ -12,8 +12,8 @@
 #include <mach/anomaly.h>
 
 #define MK_BMSK_(x) (1<<x)
-#define BFIN_DEPOSIT(mask, x)	(((x) << (__ffs(mask) - 1)) & (mask))
-#define BFIN_EXTRACT(mask, x)	(((x) & (mask)) >> (__ffs(mask) - 1))
+#define BFIN_DEPOSIT(mask, x)	(((x) << __ffs(mask)) & (mask))
+#define BFIN_EXTRACT(mask, x)	(((x) & (mask)) >> __ffs(mask))
 
 #ifndef __ASSEMBLY__
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to