Re: [PATCH v2] lib: crypto: fix comments for count_leading_zeros()
From: Eric Biggers
Date: Thu Mar 12 2026 - 18:03:03 EST
On Thu, Mar 12, 2026 at 12:34:39PM -0400, Yury Norov wrote:
> On Thu, Mar 12, 2026 at 06:17:48PM +0200, Andy Shevchenko wrote:
> > 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>
>
> Thanks, it worth!
>
> Applied for testing in -next.
>
> Thanks,
> Yury
Acked-by: Eric Biggers <ebiggers@xxxxxxxxxx>
- Eric