Re: [PATCH] lib/div64: off by one in shift
From: Andrew Morton
Date: Mon Jan 28 2019 - 12:45:09 EST
On Mon, 28 Jan 2019 15:49:04 +0100 Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote:
> fls counts bits starting from 1 to 32 (returns 0 for zero argument).
> If we add 1 we shift right one bit more and loose precision from
> divisor, what cause function incorect results with some numbers.
>
> Corrected code was tested in user-space, see bugzilla:
> https://bugzilla.kernel.org/show_bug.cgi?id=202391
What are the usersoace-visible runtime effects of this change?
Thanks.