Re: [PATCH v2] lib: crypto: fix comments for count_leading_zeros()

From: Andy Shevchenko

Date: Thu Mar 12 2026 - 12:22:36 EST


On Thu, Mar 12, 2026 at 12:11:32PM -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.
>
> 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.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko