]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] md: use ffz instead of find_first_set to convert multiplier to shift
authorPaul Clements <paul.clements@steeleye.com>
Tue, 3 Oct 2006 08:16:01 +0000 (01:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 3 Oct 2006 15:04:18 +0000 (08:04 -0700)
commita638b2dc951c4cafea31b34a1db1c3d94809649e
tree73c1c2135a117290308b5807b6ede21389e3264c
parent14f50b49fdab8f4c9fc87b55d3631e3bf1ffd385
[PATCH] md: use ffz instead of find_first_set to convert multiplier to shift

find_first_set doesn't find the least-significant bit on bigendian machines,
so it is really wrong to use it.

ffs is closer, but takes an 'int' and we have a 'unsigned long'.  So use
ffz(~X) to convert a chunksize into a chunkshift.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/bitmap.c