]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib: crypto: fix comments for count_leading_zeros()
authorYury Norov <ynorov@nvidia.com>
Tue, 10 Mar 2026 20:53:02 +0000 (16:53 -0400)
committerYury Norov <ynorov@nvidia.com>
Mon, 23 Mar 2026 17:33:51 +0000 (13:33 -0400)
commit18c48899653fa7a04120537c228031b5c7e4e9d6
tree804360c62af6601c85ef471a08602101b4d3fbdb
parentc6a98dff41bfb4ccc2c7f4ed596bcbf6994d5d1a
lib: crypto: fix comments for count_leading_zeros()

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.

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.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
include/linux/count_zeros.h
lib/crypto/mpi/longlong.h