]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - lib/bitmap.c
lib: bitmap: remove redundant code from __bitmap_shift_left
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Fri, 13 Feb 2015 22:36:19 +0000 (14:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Feb 2015 05:21:35 +0000 (21:21 -0800)
commit7f590657937f1c59163ff14a13062439a18e4a37
treec07798a14a2394d7fc7771e1baa95b90e63539bc
parent6d874eca6595629258a5d9af237c5ae53a9544e1
lib: bitmap: remove redundant code from __bitmap_shift_left

The first of these conditionals is completely redundant: If k == lim-1, we
must have off==0, so the second conditional will also trigger and then it
wouldn't matter if upper had some high bits set.  But the second
conditional is in fact also redundant, since it only serves to clear out
some high-order "don't care" bits of dst, about which no guarantee is
made.

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