On 30.11.2022 12:27, Ayan Kumar Halder wrote:
> Looking at "min(flsl(mfn + 1) - 1 + PAGE_SHIFT, PADDR_BITS);", I do not 
> understand the reason for "... -1" (ie subtracting by 1).
> 
> Do you know the reason ?

That's because fls() and flsl() and friends return 1-based bit indexes
(with 0 being returned when the input was zero), when we need 0-based
values here.

Jan

Reply via email to