From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yury Norov <ynorov@nvidia.com>
Cc: Yury Norov <yury.norov@gmail.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Eric Biggers <ebiggers@kernel.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] lib: crypto: fix comments for count_leading_zeros()
Date: Wed, 11 Mar 2026 00:53:47 +0200 [thread overview]
Message-ID: <abCg-0AGnvyTJqdc@ashevche-desk.local> (raw)
In-Reply-To: <20260310211021.95362-1-ynorov@nvidia.com>
On Tue, Mar 10, 2026 at 05:10:20PM -0400, Yury Norov wrote:
> count_leading_zeros() is based on fls(), which is defined for x == 0,
> contrary to ffs() family. The comment in crypto/mpi erroneously states
> that the function may return undef in such case.
You have a trailing space in this line.
> Fix the comment together with the outdated function signature, and now
> that COUNT_LEADING_ZEROS_0 is not referenced in the codebase, get rid of
> it too.
...
> - * 6) count_trailing_zeros(count, x) like count_leading_zeros, but counts
> + * 6) count_trailing_zeros() like count_leading_zeros, but counts
While at it,
count_leading_zeros()
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-03-10 22:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 21:10 Yury Norov
2026-03-10 22:53 ` Andy Shevchenko [this message]
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=abCg-0AGnvyTJqdc@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=ebiggers@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=ynorov@nvidia.com \
--cc=yury.norov@gmail.com \
/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®