No. "fls" is for finding the last set bit in an _int_. It is not
supposed to have random crap passed to it, such as types longer than
sizeof(int).
If you're going to pass long long (64-bit) arguments to fls, and then
cast them to a u32, you're truncating the value, and you'll get the
wrong answer if bit 33 or greater is set. If you don't actually care
about the upper bits, don't pass a 64-bit quantity to fls().
If you want to use fls with a long long, use fls64 instead. Or for top
marks, use a u64 and fls64.
But that was the problem we began with: the generic fls64 passes an u64
to fls. Nickolay's original patch solves that by putting a cast to u32
in fls64. I did not, however, understand why the cast was needed.