Re: [PATCH] lib: crypto: fix comments for count_leading_zeros()
From: Andy Shevchenko
Date: Tue Mar 10 2026 - 18:53:58 EST
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