From: Eddie Lin <eddielin0926@gmail.com>
To: arnd@arndb.de
Cc: rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, eddielin0926@gmail.com
Subject: [PATCH] sched: fix comment for sched_find_first_bit()
Date: Sun, 10 Jul 2022 23:21:19 +0800 [thread overview]
Message-ID: <20220710152119.3803-1-eddielin0926@gmail.com> (raw)
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.
Signed-off-by: Eddie Lin <eddielin0926@gmail.com>
---
arch/alpha/include/asm/bitops.h | 4 ++--
include/asm-generic/bitops/sched.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h
index e1d8483a4..9af3528f5 100644
--- a/arch/alpha/include/asm/bitops.h
+++ b/arch/alpha/include/asm/bitops.h
@@ -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])
diff --git a/include/asm-generic/bitops/sched.h b/include/asm-generic/bitops/sched.h
index 86470cfce..2b614eb40 100644
--- a/include/asm-generic/bitops/sched.h
+++ b/include/asm-generic/bitops/sched.h
@@ -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)
{
--
2.25.1
reply other threads:[~2022-07-10 15:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220710152119.3803-1-eddielin0926@gmail.com \
--to=eddielin0926@gmail.com \
--cc=arnd@arndb.de \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®