Skip to contentSkip to conversation

generic fls64()

PATCH New Rune Torgersen 2 participants 2 messages Feb 2, 2006 – Feb 3, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Review

Quoted 7 lines

From: Akinobu Mita
Sent: Wednesday, February 01, 2006 03:03

(quoted diff) +5 -0
+static inline int fls64(__u64 x)
+{
+	__u32 h = x >> 32;
+	if (h)
+		return fls(x) + 32;

Shouldn't this be return fls(h) + 32; ??

                            ^^^
Quoted 12 lines
(quoted diff) +4 -1
+	return fls(x);
+}
+
+#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */
 
--

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

#1 lore raw

PATCH 1/1 fix generic_fls64()

Noticed by Rune Torgersen.

fix generic_fls64().
tcp_cubic is using fls64().

 include/linux/bitops.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
include/linux/bitops.h +1 -1
Index: 2.6-git/include/linux/bitops.h
===================================================================
@@ -81,7 +81,7 @@ static inline int generic_fls64(__u64 x)
 {
 	__u32 h = x >> 32;
 	if (h)
-		return fls(x) + 32;
+		return fls(h) + 32;
 	return fls(x);
 }