Skip to contentSkip to conversation

sched: fix comment for sched_find_first_bit()

PATCH New Eddie Lin 1 participant 1 message Jul 10, 2022

Subsystems (3)
lore
Share & tools
lore

Eddie Lin

author
#0 lore raw

PATCH 1/1 sched: fix comment for sched_find_first_bit()

The result of __ffs is undefined if the word is zero. Therefore, it should be guaranteed that at least one of the 100 bits is set.

---
 arch/alpha/include/asm/bitops.h    | 4 ++--
 include/asm-generic/bitops/sched.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/alpha/include/asm/bitops.h +2 -2
index e1d8483a4..9af3528f5 100644
@@ -434,8 +434,8 @@ static inline unsigned int __arch_hweight8(unsigned int w)
 
 /*
  * Every architecture must define this function. It's the fastest
- * way of searching a 100-bit bitmap.  It's guaranteed that at least
- * one of the 100 bits is cleared.
+ * way of searching a 100-bit bitmap. It's guaranteed that at least
+ * one of the 100 bits is set.
  */
 static inline unsigned long
 sched_find_first_bit(const unsigned long b[2])
include/asm-generic/bitops/sched.h +2 -2
index 86470cfce..2b614eb40 100644
@@ -7,8 +7,8 @@
 
 /*
  * Every architecture must define this function. It's the fastest
- * way of searching a 100-bit bitmap.  It's guaranteed that at least
- * one of the 100 bits is cleared.
+ * way of searching a 100-bit bitmap. It's guaranteed that at least
+ * one of the 100 bits is set.
  */
 static inline int sched_find_first_bit(const unsigned long *b)
 {
Signature · 1 line
2.25.1