]> git.baikalelectronics.ru Git - kernel.git/commit
lib: bitmap: eliminate branch in __bitmap_shift_right
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Fri, 13 Feb 2015 22:36:05 +0000 (14:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Feb 2015 05:21:35 +0000 (21:21 -0800)
commitb66f1d4b03151b353d8cbefb60ffc7357e8bb559
tree83b3b1366c55f3de296379435c4429a4b68e0cd7
parent0f784c2f714b6f7cb8f849c46083e6a45fa37e55
lib: bitmap: eliminate branch in __bitmap_shift_right

We can shift the bits from lower and upper into place before assembling
dst[k]; moving the shift of upper into the branch where we already know
that rem is non-zero allows us to remove a conditional.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/bitmap.c