Messages in this thread | | | Date | 2 Feb 2015 06:47:59 -0500 | From | "George Spelvin" <> | Subject | Re: [PATCH v2 1/3] lib: find_*_bit reimplementation |
| |
Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote: > ... and this be part of _find_next_bit? Can find_next_bit not be simply > 'return _find_next_bit(addr, size, offset, 1);', and similarly for > find_next_zero_bit? Btw., passing true and false for the boolean > parameter may be a little clearer.
Looking at the generated code, it would be better to replace the boolean parameter with 0ul or ~0ul and XOR with it. The same number of registers, and saves a conditional branch.
(I was hoping GCC would figure that trick out, but it didn't.)
| |