On Tue, Mar 6, 2012 at 1:40 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > (*) "1 << ffz(a)" can be written as > > a = ~a; /* Turn the zero bits into 1 bits */ > a &= -a; /* .. and find the first one. */ > > without ever doing any insane bit scanning. Alternatively, wite it directly as "(a+1) &~a", which is the same expression just written differently (due to "-a == ~a+1") Yeah, I've been playing too much with the bitwise optimizations of the dentry cache name comparisons lately. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html