Re: [PATCH 1/5] ARM: findbit: document ARMv5 bit offset calculation

From: Linus Torvalds
Date: Fri Oct 28 2022 - 15:10:41 EST


On Fri, Oct 28, 2022 at 12:01 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> In contrast, the arm code doesn't do the "min()" at all, and if there
> are bits after the bitmap (in a partial byte), it will just return
> those bits.

No, I did misread the code. It returns 'size' for the no bits case,
and the 'movlo r0, r1'; does the right thing for the "bits past the
end" case too.

I guess I need to get better at reading arm asm.

Linus